If all nodes of the primary instance in an ApsaraDB RDS for PostgreSQL Global Active Database (GAD) instance group are unavailable, you can promote a secondary instance to the new primary instance. This action changes the instance from a read-only secondary instance to a read/write primary instance, allowing you to quickly restore application services. This feature is useful for scenarios such as disaster recovery drills and cross-region disaster recovery.
Prerequisites
The Global Active Database (GAD) instance group is in the Running state.
Precautions
-
Promoting a secondary instance to a primary instance carries a risk of data loss. Proceed with caution. This process may cause a transient connection interruption. Ensure your application supports automatic reconnection.
-
A DTS synchronization link is one-way. Promoting a secondary instance to a primary instance removes the original primary instance from the GAD instance group and disconnects the DTS synchronization link. Proceed with caution.
The removed ApsaraDB RDS for PostgreSQL instance is not released. The data in the instance and the DTS synchronization account remain unchanged. You can still manage these ApsaraDB RDS for PostgreSQL instances on the Instances page.
NoteAfter the promotion, you can add the removed ApsaraDB RDS for PostgreSQL instance back to the instance group as a secondary instance. For more information, see Add a secondary instance.
Procedure
-
Go to the Global Active Instances page.
-
On the Global Active Instances page, click the ID of the target instance group.
-
In the RDS Instance List section, find the secondary instance you want to promote, and in its Actions column, click Upgrade to Primary Database.
-
Review the information in the dialog box and click OK .
Related operations
After the promotion, you may need to update your application's endpoint to the endpoint of the new primary instance. This ensures that your application connects to the correct instance.