Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Dual-Cluster DR Query Functions

Updated on 2024-05-07 GMT+08:00
  • gs_get_local_barrier_status()

    Description: If two-city 3DC DR is enabled, the primary cluster and DR cluster synchronize logs. The barrier log is flushed to disks in the primary cluster, and replayed in the DR cluster to determine the archive log progress of the primary cluster and the log replay progress of the DR cluster. gs_get_local_barrier_status is used to query the current log replay status of each node in the DR cluster.

    Return type: text

    barrier_id: latest barrier ID of a node in the DR cluster.

    barrier_lsn: LSN of the latest barrier ID returned by a node in the DR cluster.

    archive_lsn: location of archived logs obtained by a node in the DR cluster. This parameter does not take effect currently.

    flush_lsn: location of logs that have been flushed to disks on a node in the DR cluster.

  • gs_hadr_in_recovery()

    Description: Checks whether the current node is in barrier-based log restoration if two-city 3DC DR is enabled. If yes, true is returned. Only after the log restoration is complete, can the DR cluster be promoted to the production cluster during the switchover process. This operation must be performed by the system administrator.

    Return type: Boolean

    NOTE:

    This function is used only when a planned switchover is performed in the DR cluster.

  • gs_streaming_dr_get_switchover_barrier()

    Description: Checks whether the CN and first standby DN in the DR cluster have received the switchover barrier logs and replayed the logs in the streaming replication-based two-city 3DC DR solution. If it has, true is returned. In the DR cluster, the procedure for promoting the DR database instance to the production database instance in the switchover process can be started only after the switchover barrier logs of all DNs are replayed (restricted to the system administrator).

    Return type: Boolean

    Note: This function is used only when a planned switchover is performed in the DR database instance in streaming DR solutions.

  • gs_streaming_dr_service_truncation_check()

    Description: Checks whether the CN and primary DN in the primary cluster has sent the switchover barrier logs in the streaming replication-based two-city 3DC DR solution. If it has, true is returned. The procedure for demoting the production database instance to the DR database instance in the switchover process can be started only after the logs are sent (restricted to the system administrator).

    Return type: Boolean

    Note: This function is used only when a planned switchover is performed in the DR database instance.

  • gs_hadr_local_rto_and_rpo_stat()

    Description: Displays the log flow control information of the local database instance and DR database instance for streaming DR. (If this command is executed on a node that does not participate in streaming DR, for example, a standby DN or a CN, no information may be returned.)

    The return value type is record. The types and meanings of the columns are as described in Table 1.

    Table 1 Parameters of gs_hadr_local_rto_and_rpo_stat

    Parameter

    Type

    Description

    hadr_sender_node_name

    text

    Node name, including the primary database instance and the first standby node of the standby database instance.

    hadr_receiver_node_name

    text

    Name of the first standby node of the standby database instance.

    source_ip

    text

    IP address of the primary DN of the primary database instance.

    source_port

    int

    Communication port of the primary DN of the primary database instance.

    dest_ip

    text

    IP address of the first standby DN of the standby database instance.

    dest_port

    int

    Communication port of the first standby DN of the standby database instance.

    current_rto

    int

    Flow control information, that is, log RTO time of the current primary and standby database instances (unit: second).

    target_rto

    int

    Flow control information, that is, RTO time between the target primary and standby database instances (unit: second).

    current_rpo

    int

    Flow control information, that is, log RPO time of the current primary and standby database instances (unit: second).

    target_rpo

    int

    Flow control information, that is, RPO time between the target primary and standby database instances (unit: second).

    rto_sleep_time

    int

    RTO flow control information, that is, expected sleep time (unit: μs) required by walsender on the host to reach the specified RTO.

    rpo_sleep_time

    int

    RPO flow control information, that is, the expected sleep time (unit: μs) required by xlogInsert on the host to reach the specified RPO.

  • gs_hadr_remote_rto_and_rpo_stat()

    Description: Displays the log flow control information of all other shards or CN database instances and DR database instances for streaming DR. (Generally, this command is executed on CNs. If this command is executed on DNs, no information may be returned.)

    The return value type is record. The types and meanings of the columns are as described in Table 2.

    Table 2 gs_hadr_remote_rto_and_rpo_stat

    Parameter

    Type

    Description

    hadr_sender_node_name

    text

    Node name, including the primary database instance and the first standby node of the standby database instance.

    hadr_receiver_node_name

    text

    Name of the first standby node of the standby database instance.

    source_ip

    text

    IP address of the primary DN of the primary database instance.

    source_port

    int

    Communication port of the primary DN of the primary database instance.

    dest_ip

    text

    IP address of the first standby DN of the standby database instance.

    dest_port

    int

    Communication port of the first standby DN of the standby database instance.

    current_rto

    int

    Flow control information, that is, log RTO time of the current primary and standby database instances (unit: second).

    target_rto

    int

    Flow control information, that is, RTO time between the target primary and standby database instances (unit: second).

    current_rpo

    int

    Flow control information, that is, log RPO time of the current primary and standby database instances (unit: second).

    target_rpo

    int

    Flow control information, that is, RPO time between the target primary and standby database instances (unit: second).

    rto_sleep_time

    int

    RTO flow control information, that is, expected sleep time (unit: μs) required by walsender on the host to reach the specified RTO.

    rpo_sleep_time

    int

    RPO flow control information, that is, the expected sleep time (unit: μs) required by xlogInsert on the host to reach the specified RPO.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback