All Products
Search
Document Center

ApsaraDB RDS:Exchange endpoints

Last Updated:Jun 20, 2026

ApsaraDB RDS for PostgreSQL allows you to exchange the endpoints of two instances with a single click. This feature reduces the exchange time required when, for example, replacing an old instance with a new one.

Prerequisites

To exchange endpoints between two ApsaraDB RDS for PostgreSQL instances, they must meet the following conditions:

  • The instances are in the Running state.

  • Both instances belong to the same Alibaba Cloud account.

  • The billing method of each instance is pay-as-you-go or subscription.

  • The endpoints must use the same port.

  • The connection pool (PgBouncer) is disabled on the instances.

  • Babelfish is not enabled. The minor version number of the instances must not end with babelfish.

Usage notes

  • You can only exchange endpoints of the same type.

    Source endpoint type

    Compatible target endpoint type

    Internal endpoint

    Internal endpoint

    Public endpoint

    Public endpoint

  • This process does not exchange IP whitelists. Before you exchange the endpoints, manually synchronize the IP whitelists for both instances.

  • After the exchange, the source instance automatically becomes read-only to ensure data consistency. Designate the instance that will no longer serve traffic as the source instance and the one that will continue to serve traffic as the target instance.

    Note

    To remove the read-only state from the source instance, change the value of its rds_force_trans_ro_non_sup parameter to off. Before changing this parameter, perform thorough validation to prevent data inconsistencies.

Procedure

  1. Go to the Instances page. In the top navigation bar, select a region and then click the ID of the source instance.

  2. In the navigation pane on the left, click Database Connection.

  3. On the Database Connection page, click Exchange Endpoint.

  4. In the dialog box that appears, switch the network type if needed, select a Target Instance Name, specify whether to Retain VIP, and then click OK.

    The system automatically populates the Source Instance Endpoint and the corresponding Target Endpoint.

    Important

    Retaining the virtual IP address (VIP) can cause DNS caching issues, which may prolong the switchover time.

Related API

You can call the ModifyDBInstanceConnectionString API operation to exchange instance endpoints by specifying the TargetDBInstanceId and RetainVip parameters in your request.