Managed Service for PostgreSQL API, REST: ManagedRepack.LaunchRepack
Launches new Repack in given cluster
HTTP request
POST https://mdb.api.cloud.yandex.net/managed-postgresql/v1/clusters/{clusterId}:managedRepack_launch
Path parameters
Request to launch a new Repack in a cluster.
|
Field |
Description |
|
clusterId |
string Required field. Required. ID of the PostgreSQL cluster that Repack is running in. The maximum string length in characters is 50. |
Body parameters
{
"spec": {
"type": "string",
"dbname": "string",
"targets": [
{
"schema": "string",
// Includes only one of the fields `name`, `allInSchema`
"name": "string",
"allInSchema": "boolean"
// end of the list of possible fields
}
],
"waitTimeout": "string",
"jobs": "string"
},
"startTimeout": "string",
"launchId": "string"
}
Request to launch a new Repack in a cluster.
|
Field |
Description |
|
spec |
Required field. Specification of repack to launch |
|
startTimeout |
string (duration) Initial timeout to tell finished immediately from running repacks |
|
launchId |
string UUID of launch to be set by client |
RepackSpec
Represents specification for launching new Repack process
|
Field |
Description |
|
type |
enum (RepackType) Which objects to repack
|
|
dbname |
string database name this repack process is working with |
|
targets[] |
list of target objects this repack process is working with |
|
waitTimeout |
string (int64) pg_repack option; timeout to cancel other backends on conflict |
|
jobs |
string (int64) pg_repack option; Use this many parallel jobs for each table |
RepackTarget
Single object to repack
|
Field |
Description |
|
schema |
string Schema of object to be repacked |
|
name |
string Name of object to be repacked Includes only one of the fields Object to repack within the schema. |
|
allInSchema |
boolean All objects within given schema are to be repacked Includes only one of the fields Object to repack within the schema. |
Response
HTTP Code: 200 - OK
{
// Includes only one of the fields `finished`, `running`
"finished": {
"clusterId": "string",
"exitCode": "string",
"launchId": "string"
},
"running": {
"clusterId": "string",
"startTime": "string",
"spec": {
"type": "string",
"dbname": "string",
"targets": [
{
"schema": "string",
// Includes only one of the fields `name`, `allInSchema`
"name": "string",
"allInSchema": "boolean"
// end of the list of possible fields
}
],
"waitTimeout": "string",
"jobs": "string"
},
"launchId": "string"
}
// end of the list of possible fields
}
Result of a Repack launch.
|
Field |
Description |
|
finished |
Returned if pg_repack finishes immediately before start_timeout expires Includes only one of the fields Outcome of the launch: finished immediately or still running. |
|
running |
Returned if pg_repack still runs after start_timeout expires Includes only one of the fields Outcome of the launch: finished immediately or still running. |
FinishedRepack
Represents already finished repack process
|
Field |
Description |
|
clusterId |
string Which cluster this repack was launched in |
|
exitCode |
string (int64) Exit code of this repack launch |
|
launchId |
string UUID of launch, identifier of specific instance of launched repack |
RunningRepack
Represents currently running repack process
|
Field |
Description |
|
clusterId |
string Which cluster this repack runs in |
|
startTime |
string (date-time) When this repack process has been started String in RFC3339 To work with values in this field, use the APIs described in the |
|
spec |
Specification for this running repack |
|
launchId |
string UUID of launch, identifier of specific instance of launched repack |
RepackSpec
Represents specification for launching new Repack process
|
Field |
Description |
|
type |
enum (RepackType) Which objects to repack
|
|
dbname |
string database name this repack process is working with |
|
targets[] |
list of target objects this repack process is working with |
|
waitTimeout |
string (int64) pg_repack option; timeout to cancel other backends on conflict |
|
jobs |
string (int64) pg_repack option; Use this many parallel jobs for each table |
RepackTarget
Single object to repack
|
Field |
Description |
|
schema |
string Schema of object to be repacked |
|
name |
string Name of object to be repacked Includes only one of the fields Object to repack within the schema. |
|
allInSchema |
boolean All objects within given schema are to be repacked Includes only one of the fields Object to repack within the schema. |