All Products
Search
Document Center

PolarDB:Primary-secondary instance switchover

Last Updated:Jun 20, 2026

This topic describes how to perform a primary-secondary instance switchover in a Global Database Network (GDN).

Prerequisites

The GDN service must be enabled and have at least one secondary instance. For more information, see Enable the GDN service.

Procedure

Find the GDN that you want to manage.

  1. Log on to the PolarDB for X-Engine console. In the navigation pane on the left, click GDN.

  2. On the GDN list page, find the target Secondary Instance and click Upgrade to Primary Instance on the right.

    Note

    Alternatively, click the target GDN ID to open the GDN details page. Then, find the target Secondary Instance and click Upgrade to Primary Instance on the right.

  3. In the Upgrade to Primary Instance dialog box, select a switchover method and click OK.

    The switchover methods include Normal Switchover (RPO=0) and Forced Switchover (RPO>=0). Use a normal switchover when all cluster instances and data replication links are healthy. During this switchover, the system disables write operations on all instances to prevent data loss. Use a forced switchover when the primary instance fails and cannot be recovered quickly. The system immediately promotes the secondary instance to the new primary instance, and any uncommitted transactions are lost.

    Note

    In multi-active mode, DDL synchronization supports only one-way synchronization from the primary instance to secondary instances. When a switchover occurs, the roles of the primary and secondary instances are swapped, and the system adjusts the direction of DDL synchronization accordingly.