All Products
Search
Document Center

ApsaraDB RDS:Change the vSwitch of an ApsaraDB RDS for PostgreSQL instance

Last Updated:Feb 10, 2025

This topic describes how to change the vSwitch of an ApsaraDB RDS for PostgreSQL instance in the ApsaraDB RDS console or by calling an API operation.

Prerequisites

The RDS instance uses standard SSDs or enhanced SSDs (ESSDs).

Limits

Impacts

  • When you switch your RDS instance to a different vSwitch, a transient connection that lasts approximately 30 seconds occurs. Make sure that your application is configured to automatically reconnect to your RDS instance.

  • After you switch your RDS instance to a different vSwitch, the virtual IP address (VIP) of your RDS instance changes. We recommend that you connect your application to your RDS instance by using an endpoint. For more information, see Configure endpoints.

  • The VIP change interrupts the connection between your RDS instance and Data Management (DMS) and the connection between your RDS instance and Data Transmission Service (DTS) for a short period of time. After you switch your RDS instance to a different vSwitch and the VIP of the RDS instance is changed, the connections are automatically resumed.

  • The DNS cache on your database client may prevent you from writting data to the database. After you switch your RDS instance to a different vSwitch, we recommend that you immediately clear the DNS cache on the database client.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Database Connection.

  3. Click Switch vSwitch. 切换交换机

  4. Select the required vSwitch and click OK.

    If no vSwitch is available in the current zone in which the instance resides, go to the VPC console to create one.

  5. In the dialog box that appears, click OK.

FAQ

How do I change the VPC of an RDS instance?

You cannot change the virtual private cloud (VPC) of an RDS for PostgreSQL instance. However, you can use one of following solutions to achieve the same goal:

Reference

For more information about how to change the vSwitch of an RDS instance to a vSwitch that belongs to a different zone, see Migrate an ApsaraDB RDS for PostgreSQL instance across zones in the same region.

Related API operation

Operation

Description

SwitchDBInstanceVpc

Changes the vSwitch of an RDS for PostgreSQL instance.

Important

You cannot directly change the VPC of an RDS for PostgreSQL instance. Therefore, you must set the VPCId parameter to the VPC of the current instance.