ApsaraDB RDS for PostgreSQL supports three data replication modes for High-availability Edition instances: asynchronous, synchronous, and semi-synchronous. Change the replication mode to balance write performance against data protection based on your workload requirements.
How it works
In a High-availability Edition deployment, your RDS instance continuously replicates data from the primary instance to a standby instance. The data replication mode controls how the primary instance handles transaction commits relative to standby replication:
-
Asynchronous -- The primary instance commits transactions without waiting for the standby to confirm receipt. This delivers the fastest write performance but allows potential data loss during failover.
-
Synchronous -- The primary instance waits for the standby to confirm that data has been written before committing. This provides the strongest data protection at the cost of higher write latency.
-
Semi-synchronous -- The primary instance waits for the standby up to a configurable timeout. If the standby does not respond within the timeout, the instance falls back to asynchronous mode temporarily. After data catches up, it returns to semi-synchronous mode automatically. This balances performance and protection for most production workloads.
When to use each mode
| Data replication mode | Protection level | Performance | Data loss risk on failover | Best for |
|---|---|---|---|---|
| Asynchronous (default) | Optimal performance | Highest write speed | Medium | Logging, analytics ingestion, dev/test workloads where brief data loss is acceptable |
| Synchronous | Optimal protection | Medium write speed | Lowest | Financial transactions, order processing, workloads requiring strong data protection |
| Semi-synchronous | High availability | Balanced | Low (bounded by timeout) | Most production workloads that need both reliable performance and strong data protection |
Prerequisites
Before you begin, make sure that you have:
-
An RDS instance running High-availability Edition with cloud disks
-
Minor engine version 20220228 or later (required only for the Semi-synchronous mode). For details, see Update the minor engine version
Check the current data replication mode
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Then, click the instance ID.
-
In the left-side navigation pane, click Service Availability.
-
In the Instance Availability section, find the Data Replication Mode value.

Change the data replication mode
Method 1: Use the console
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Then, click the instance ID.
-
In the left-side navigation pane, click Service Availability.
-
Click Change Data Replication Mode.

-
Select the desired Data Replication Mode.
ImportantTo use Semi-synchronous mode, make sure that the minor engine version of your RDS instance is 20220228 or later. For details, see Update the minor engine version.
-
Click Ok.
Method 2: Modify parameters
Modify the synchronous_commit, rds_sync_replication_timeout, and synchronous_standby_names parameters directly to change the replication mode.
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Then, click the instance ID.
-
In the left-side navigation pane, click Parameters.
-
On the Modifiable Parameters tab, find the
synchronous_commit,rds_sync_replication_timeout, andsynchronous_standby_namesparameters. -
In the Running Value column, click the edit icon next to the parameter value. Enter the new value and click Ok.
Set the parameters according to the target replication mode:
Asynchronous mode
Parameter Value synchronous_commitoffNoteWhen
synchronous_commitis set tooff, therds_sync_replication_timeoutparameter has no effect.Synchronous mode
Parameter Value synchronous_commitremote_writerds_sync_replication_timeout0synchronous_standby_names'standby1'Semi-synchronous mode
Parameter Value synchronous_commitremote_writerds_sync_replication_timeoutGreater than 0. Range: 0--300000 ms. Recommended:500.synchronous_standby_names'standby1'NoteThe
rds_sync_replication_timeoutparameter specifies the synchronization timeout in milliseconds. If a synchronization operation times out, the instance temporarily falls back to asynchronous mode (optimal performance protection level). After data synchronization catches up, the instance automatically returns to semi-synchronous mode (high availability protection level).ImportantThe default value of
synchronous_standby_namesisstandby1. If you have a self-managed secondary instance, do not name itstandby1. Otherwise, the RDS instance may replicate data to the self-managed instance in synchronous or semi-synchronous mode, which can cause data loss during a primary/secondary switchover. -
Click Apply Changes.

Verify the change
After changing the data replication mode, verify that the new mode is active:
-
In the left-side navigation pane, click Service Availability.
-
In the Instance Availability section, confirm that the Data Replication Mode value matches your configuration.
Usage notes
-
This feature is available only for instances running High-availability Edition with cloud disks.
-
Semi-synchronous mode requires minor engine version 20220228 or later.
-
If you have a self-managed secondary instance, do not name it
standby1. The default value ofsynchronous_standby_namesisstandby1. A naming conflict can cause the RDS instance to replicate data to the self-managed instance in synchronous or semi-synchronous mode, leading to potential data loss during a primary/secondary switchover. -
In semi-synchronous mode, if the standby does not respond within the
rds_sync_replication_timeoutperiod, the instance temporarily operates in asynchronous mode. Normal semi-synchronous replication resumes automatically after the standby catches up.