Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Configuring Replication Delay for a Read Replica (RDS for PostgreSQL)/ Querying the Databases That Can Be Restored to the Primary DB Instance from a Read Replica
Updated on 2025-08-20 GMT+08:00

Querying the Databases That Can Be Restored to the Primary DB Instance from a Read Replica

Function

This API is used to query the databases that can be restored to the primary DB instance from a read replica.

Constraints

  • To use this function, contact customer service.
  • This API is available only to read replicas of RDS for PostgreSQL 12 or later.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/log-replay/database

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    ID of the instance to be queried.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request Parameters

None

Example Request

Query the databases that can be restored to the primary DB instance from a read replica.

GET https://rds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/e28979107ed04d3b8b2f1b819b8d2be3in03/log-replay/database

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    database_limit

    Integer

    Definition

    Maximum number of databases that can be returned each time.

    Range

    N/A

    total_tables

    Integer

    Definition

    Total number of returned tables.

    Range

    N/A

    table_limit

    Integer

    Definition

    Maximum number of tables that can be returned each time.

    Range

    N/A

    databases

    Array of objects

    Definition

    Databases that can be restored to the primary instance.

    For details, see Table 3.

    Table 3 databases field data structure description

    Parameter

    Type

    Description

    name

    String

    Definition

    Database name.

    Range

    N/A

    total_tables

    Integer

    Definition

    Total number of tables in the database.

    Range

    N/A

    schemas

    Array of objects

    Definition

    Schemas in the database.

    For details, see Table 4.

    Table 4 schemas field data structure description

    Parameter

    Type

    Description

    name

    String

    Definition

    Schema name.

    Range

    N/A

    total_tables

    Integer

    Definition

    Total number of tables in the schema.

    Range

    N/A

    tables

    Array of objects

    Definition

    Tables in the schema.

    For details, see Table 5.

    Table 5 tables field data structure description

    Parameter

    Type

    Description

    name

    String

    Definition

    Table name.

    Range

    N/A

  • Example normal response
    { 
      "databases" : [ { 
        "name" : "postgres", 
        "schemas" : [ ], 
        "total_tables" : 0 
      } ], 
      "database_limit" : 2000, 
      "table_limit" : 20000, 
      "total_tables" : 0 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.