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
Situation Awareness
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

Configuring Replication Delay for a Read Replica

Updated on 2025-01-02 GMT+08:00

Scenarios

You can configure a replication delay for a read replica. The read replica replays the WAL logs received from the primary instance after the specified delay.

If any data is deleted from your DB instance by mistake, it will be deleted from the read replica after the specified delay. During this time period, you can stop WAL log replay on the read replica, dump the data from the read replica, and insert it into the primary instance to restore the data.

Constraints

  • To use this function, contact customer service to obtain required permissions.
  • This function is only available to read replicas of RDS for PostgreSQL 12 and later versions.
  • After you enable WAL replay to a specific time, the replication between the primary instance and read replica will be interrupted. During this period, if the WAL logs of the primary instance are rotated, the read replica will be disconnected from the primary instance (data of the primary instance cannot be synchronized to the read replica). To reconnect the read replica to the primary instance, reset the replay time and contact customer service to restore the read replica. The time required depends on how much data there is in the read replica and how many available resources there are in the primary instance.

Configuring Read Replica Delay

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. In the instance list, click in front of the target DB instance and then click the name of the target read replica.
  5. Go to the Read Replica Delay page or refresh the page. The read replica delay details at the current time are displayed.

    Figure 1 Read Replica Delay Details
    Table 1 Read replica delay details

    Parameter

    Description

    WAL Replay

    The WAL replay status of the read replica. You can pause or resume WAL replay by toggling the switch.

    • Toggling on the switch: WAL replay starts.
    • Toggling off the switch: WAL replay pauses.

    Actual Delay

    The actual delay for WAL replay on the read replica during page loading or refreshing, in ms.

    The value of this parameter is slightly different from that of Custom Delay. For example, if there are no data writes to the primary instance and no WAL logs are synchronized, the actual delay is 0 ms.

    Custom Delay

    User-defined delay, in ms. Click to edit it.

    The delay cannot be too long. Otherwise, if the primary instance is heavily loaded, a large number of WAL logs are stacked on the read replica, causing full storage issues or even read replica disconnection.

    Latest Replayed WAL Log Position

    The latest WAL log position replayed by the read replica.

    Latest Received WAL Log Position

    The latest WAL log position received by the read replica.

Replaying WAL Data to a Specific Time

  1. On the Read Replica Delay page of the read replica, pause WAL replay.

    Figure 2 Pausing replay

  2. Toggle on the replay switch and select To a specific time for Replay Type. The replay will be paused after the WAL logs are replayed to the specified time.

    Figure 3 Replaying to a specific time
    NOTE:

    Automatic indicates the normal replay state. The read replica will continuously replay the received WAL logs.

  3. Specify Replay Time and click OK.

    NOTE:

    The read replica replays WAL logs to the closest transaction commit time before the target replay time.

  4. Click Reboot to replay WAL logs to the specified time.

    Figure 4 Rebooting the read replica

  5. Check the replay status.

    Figure 5 Replaying
    Figure 6 Replay completed

  6. To restore the replay, reset the replay time and reboot the read replica.

    1. Click Reset Replay Time. In the displayed dialog box, click OK.
      NOTE:

      After the read replica is rebooted, there will still be a replay delay. The delay depends on the value of recovery_min_apply_delay. If you want to immediately replay the WAL logs to the specified time, set this parameter to 0.

      Figure 7 Resetting the replay time
    2. Click Reboot.
      Figure 8 Rebooting the read replica
    3. Check whether the replay status becomes normal.
      Figure 9 Normal replay

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