Help Center> Relational Database Service> API Reference> API v3 (Recommended)> DR Instances> Querying the Cross-Cloud DR Replication Status

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.

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.

Request

  • Parameter description

    None

  • Request example

    None

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.