- Documentation
RDS for PostgreSQL
User guide
Service availability
Switching primary node
Service availability
Switching primary node
Switching primary node
RDS for PostgreSQL supports switching between primary and secondary nodes. When the system detects an instance failure, it immediately triggers a switch between the primary and secondary nodes to restore normal operations and ensure instance high-availability. This topic describes the steps to manually switch the primary node.
Prerequisites
- No migration tasks are ongoing.
Precautions
- If the instance has read-only nodes mounted, the data on the read-only nodes may experience several minutes of latency after the primary node switch.
- Switching the primary node generally takes 30 to 60 seconds, during which the database will experience 1 to 2 brief disconnections. Operate carefully. It is recommended that you add a reconnection mechanism to the application, which can greatly reduce the impact of database connection disconnection on the business.
Procedure
- In the upper-left corner of the top menu bar, select the project and region for the instance.
tip
If the project of the instance has not been set, the project should be selected as All resources.
- Go to the Instances page and click on the target instance name to open the Summary page.
- Click the Connectivity tab. In the Instance topology area, hover over the Secondary node, click Switch to primary node in the pop-up window, and then click OK in the dialog box to complete the switch of the primary and secondary nodes.
Last updated: 2025.11.17 16:15:07