Querying the Cross-Cloud DR Replication Status
Function
After the cross-cloud DR relationship is established, query the replication status and delay between the primary instance and DR instance.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
- The DR relationship between the primary DB instance and DR instance has been established.
- Only DR instances of PostgreSQL 11, PostgreSQL 12, and PostgreSQL Enhanced Edition support cross-cloud DR replication status query.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/disaster-recovery
- Example
https://rds.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/disaster-recovery
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Specifies the DB instance ID.
Response
- Normal response
Table 2 Parameter description Name
Type
Description
replica_state
String
Indicates the synchronization status. The value can be 0 or -1. The value 0 indicates that the synchronization status is normal, and the value -1 indicates that the synchronization status is abnormal.
wal_write_receive_delay_in_mb
String
Indicates the sending delay in MB, that is, the difference between the WAL Log Sequence Number (LSN) written by the primary DB instance and the WAL LSN received by the DR instance.
wal_write_replay_delay_in_mb
String
Indicates the end-to-end delay in MB, that is, the difference between the WAL LSN written by the primary DB instance and the WAL LSN replayed by the DR instance.
wal_receive_replay_delay_in_ms
String
Indicates the replay delay in millisecond on the DR instance.
- Example normal response
{ "replica_state": "0", "wal_write_receive_delay_in_mb": "10.0", "wal_write_replay_delay_in_mb": "10.0", "wal_receive_replay_delay_in_ms": "0" } - Abnormal Response
For details, see Abnormal Request Results.
Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.
Last Article: Promoting a DR Instance to Be the Primary DB Instance
Next Article: Database Security
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.