/create-standby/streaming/postgresql
Set up PostgreSQL WAL Streaming disaster recovery
Request
HTTP Method: POST
Content Type: application/json
Parameters
Property | Type | Description | Default | Required |
---|---|---|---|---|
| integer(int64) | configuration ID (non-negative) |
| required |
| boolean | enable observer | true |
|
| boolean | enable hot standby, allowing read-only connections to the standby cluster | true |
|
| string | directory for the standby cluster config files on standby host |
|
|
| string | directory for the standby cluster data files on standby host |
|
|
| string | password to use for the replication connection to the primary cluster |
|
|
| string | username to use for the replication connection to the primary cluster |
|
|
| string map | customize directory on standby for tablespaces |
|
|
{
"params": {
"configuration_id": 1,
"hot_standby": true,
"observer": true,
"standby_conf_dir": "string",
"standby_data_dir": "string",
"streaming_password": "string",
"streaming_username": "string",
"tablespace_dir": {
"table_space": "dir"
}
}
}
Response
HTTP Status: 200
Content Type: application/json
Response
Property | Type | Description |
---|---|---|
| object of type | error response |
| object of type |
|
| boolean | response with error or not |
error_response
Property | Type | Description |
---|---|---|
| string | error message |
task_response
Property | Type | Description |
---|---|---|
| integer(int64) | task ID |
{
"error": {
"message": "string"
},
"result": {
"task_id": 1
},
"successful": true
}
HTTP Status: 400
Content Type: application/json
Response
Property | Type | Description |
---|---|---|
| object of type | error response |
| boolean | always false |
error_response
Property | Type | Description |
---|---|---|
| string | error message |
{
"error": {
"message": "string"
},
"successful": false
}