Help Center/
Relational Database Service/
User Guide/
Working with RDS for PostgreSQL/
Instance Modifications/
Changing the Replication Mode
Updated on 2024-07-22 GMT+08:00
Changing the Replication Mode
Scenarios
RDS allows you to change the replication mode between primary and standby DB instances. Data can be asynchronously or synchronously replicated from the primary instance to the standby instance.
- Asynchronous (default): When an application writes data to the primary instance, the primary instance returns a response to the application immediately without waiting for the standby instance to receive logs.
- Advantages: Asynchronous replication involves low overhead and ensures that write operations are not blocked during a failover of your primary/standby instances.
- Disadvantages: In rare cases, replication is delayed between the primary and standby instances, and data may be lost after the failover.
- Synchronous: When an application writes data to the primary instance, the primary instance returns a response to the application only after the standby instance receives logs (which are flushed to the disk).
- Advantages: Data remains strongly consistent between the primary and standby instances, and no data loss occurs after a failover.
- Disadvantages: Synchronous replication involves high overhead and causes write operations to be blocked when the primary or standby instance is faulty.
![](https://support.huaweicloud.com/intl/en-us/usermanual-rds/public_sys-resources/note_3.0-en-us.png)
- Asynchronous replication is recommended for applications requiring a guarantee of high availability.
- Synchronous replication is recommended for applications that require strong data consistency and can tolerate a short-time blocking of write operations.
- Write operations refer to non-SELECT operations, such as DDL and DML.
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.
- On the Instances page, click the primary instance name.
- In the DB Information area on the displayed Basic Information page, click Change next to the Replication Mode field. In the displayed dialog box, select a model and click OK.
Figure 1 Changing the replication mode
- On the Basic Information page, check for the new replication mode.
Parent topic: Instance Modifications
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot