Updated on 2026-10-08 GMT+08:00

Creating a DR Relationship

Scenarios

After a cross-region DR relationship is created, if the region where the primary instance is located encounters a natural disaster and the primary instance cannot be connected, you can promote the DR instance in another region to primary. To connect to the new primary instance, you only need to change the connection address on the application side.

How Cross-Region DR Works

Two RDS for PostgreSQL instances are deployed in two data centers, one in the production center and the other in the DR center. The RDS DR function replicates data from the primary instance in the production center to the DR instance in the DR center, keeping data synchronous across the regions.

Figure 1 Topology

Supported Versions

RDS for PostgreSQL 12 and later versions support cross-region DR.

Constraints

Table 1 Constraints

Phase

Constraints

Before setup

  • Before using this function, ensure that the network between the DB instances in two different regions is connected. You can create a cloud connection to connect the VPCs in different regions.
  • Ensure that both the primary and DR instances are in normal status before setup and they reside in different regions. The primary instance is set up in primary/standby deployment, while the DR instance can be a single-node or primary/standby instance.
  • The CPU and memory specifications and storage capacity of the DR instance must be greater than or equal to those of the primary instance.
  • The underlying architecture and major version of the DR instance must be the same as those of the primary instance.
  • Cross-cloud or cross-region DR relationships cannot be established across major versions.
  • If a DB instance is hosted by a Supabase AI application, setting up DR for this instance is not allowed.
  • Ensure that at least one replication slot is reserved for DR setup before proceeding. Each DR instance requires one replication slot.
    • Run the following statement to check the maximum number of replication slots that can be created:
      show max_replication_slots;
    • Run the following statement to check the number of created replication slots:
      SELECT count(*) FROM pg_replication_slots;

During setup

  • Changing the floating IP address or port of the primary instance during DR setup will cause the setup to fail.
  • After calling the API for configuring DR for the primary instance, do not change instance specifications or perform a primary/standby switchover until the DR relationship is established.

After setup

  • If the DR instance is a primary/standby instance, you can change its instance type between primary/standby and single-node and perform a primary/standby switchover after DR setup.
  • After a DR relationship is set up, you can change the CPU and memory specifications of the DR instance.
  • Parameter changes on the primary instance are not automatically synchronized to the DR instance. You must manually modify the DR instance's parameters based on your workload requirements.
  • If the minor version of the DR instance differs from that of the primary instance, the minor version of the DR instance will be automatically reset after setup to match the primary instance.
  • After a DR instance is set up, its minor version cannot be upgraded and its data cannot be restored to any primary or DR instance involved in a DR relationship from backups.
  • RDS for PostgreSQL DR instances do not support point-in-time recovery (PITR) or CBR backups. If you need to use these features, perform them on primary instances.

Procedure

  1. Log in to the RDS console.
  2. Click in the upper left corner and select a region.
  3. Paste the information of the DR instance to the primary instance and configure DR for the primary instance.

    1. On the Instances page, click the name of an instance (to act as the DR instance) that you want to create a DR relationship for to go to the Summary page.
    2. Click DR Information.
    3. In the displayed dialog box, click Copy.
      Figure 2 DR information
    4. On the Instances page, select another instance (to act as the primary instance) and choose More > View DR Details.
    5. On the displayed page, confirm the information and click Create DR Relationship.
    6. In the displayed dialog box, paste the information you copied from 3.c into the input box and click OK.
    7. Check the task execution result on the Task Center page. If the task status is Completed, the DR settings are configured for the primary instance. Perform subsequent operations only after this task is successful.

  4. Paste the information of the primary instance to the DR instance and configure DR for the DR instance.

    1. On the Instances page, click the name of the primary instance to go to the Summary page.
    2. Click DR Information.
    3. In the displayed dialog box, click Copy.
    4. On the Instances page, select the DR instance and choose More > View DR Details.
    5. On the displayed page, confirm the information and click Create DR Relationship.
    6. In the displayed dialog box, paste the information you copied from 4.c into the input box and click OK.
    7. Check the task execution result on the Task Center page. If the task status is Completed, the DR settings are configured for the DR instance. After this task is successful, the DR relationship is created.

  5. On the Instances page, click the name of the DR instance to go to the Summary page.
  6. In the navigation pane on the left, choose DR Management. The DR replication status of the DR instance is displayed.