Configuring Replication Delay for a Read Replica
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 quickly restore the data.
Constraints
- To use this function, contact customer service to apply for required permissions.
- This function is only available to read replicas of RDS for PostgreSQL 12 and later versions.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- In the instance list, click
in front of the target DB instance and then click the name of the target read replica.
- 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: The WAL replay starts.
- Toggling off the switch: The WAL replay pauses.
Actual Delay
The actual delay for WAL log 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 synchronization is performed, 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 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot