Read-only instances offload read traffic from your primary RDS for PostgreSQL instance. Data is synchronized from the primary instance through physical replication in real time.
PostgreSQL read-only instances
Prerequisites
The primary instance must meet these requirements:
-
Version: Must be an available (non-discontinued) version. Release notes for AliPG (PostgreSQL 14~17)
-
Series: High-availability series
-
Instance type: For Premium Local SSDs, a dedicated type with at least 8 CPU cores and 32 GB memory is required. No requirement for other storage types.
-
Billing method: Subscription or pay-as-you-go. Serverless instances are not supported.
Check the edition and instance type on the Basic Information page. If the primary instance does not qualify, upgrade from Basic Edition to High-availability Edition via Change Specifications. Change instance specifications.
Before you begin
-
Select the same VPC as the primary instance. Otherwise, creation fails and a refund is issued.
-
Data is replicated from the secondary instance during creation, so primary instance workloads are not interrupted.
-
Read-only instances do not inherit parameter settings from the primary instance. Default settings are applied. Modify them in the RDS console as needed.
Read-only instances attached to new general-purpose primary instances do inherit parameter settings. Instance types for read-only ApsaraDB RDS for PostgreSQL instances.
Procedure
-
Go to the RDS instance list, select a region, and click the ID of the primary instance.
-
In the Instance Distribution area, click Add next to Read-only Instance.
NoteIf you use the previous version of the console, click Add Read-only Instance on the right.

-
Configure the following parameters.
NoteEach instance type specifies CPU cores, memory, maximum connections, and maximum IOPS. For Premium Local SSDs, read-only specifications must match or exceed the primary instance. Instance types for read-only RDS for PostgreSQL instances.
Parameter Description Billing Method Subscription: Upfront payment for long-term use. Pay-as-you-go: Hourly billing for short-term use. Switch to subscription after the instance meets your needs. Product Type YiTian is available only when the primary instance Storage Type is ESSD or Premium ESSD. Compare Standard and YiTian in Product types. Zone Each zone is an independent physical location within a region. Multi-zone deployment supports zone-disaster recovery. Instance Type General-purpose Instance Types: Exclusive memory and I/O, shared CPU and storage with other instances on the same host. Dedicated Instance Types: Exclusive CPU, memory, storage, and I/O. Dedicated-host types provide the highest specifications and occupy all resources on the physical host. Storage Capacity Covers data files, system files, WAL files, and transaction files. Adjustable in 5 GB increments. Must be at least the storage capacity of the primary instance. Instance types for read-only RDS for PostgreSQL instances. -
Click Next: Instance Configuration and configure the following parameters.
Parameter Description Network Type Defaults to the same network type, VPC, and vSwitch of Primary Node as the primary instance. Release Protection Available only when Billing Method is Pay-as-you-go. Prevents accidental release. Enable or disable Instance Release Protection. Resource Group Same as the primary instance. Cannot be modified. Time Zone Same as the primary instance. SLR Authorization No configuration needed. Permissions are granted when the primary instance is purchased. SLR authorization required from October 10, 2022. Instance Name A description to identify the read-only instance. -
Click Next: Confirm Order.
-
Read the Terms of Service, click Confirm Order, and complete the payment.
Expected creation time
Creation time depends on the storage type.
| Storage type | Estimated time |
|---|---|
| Standard SSD | Approximately 20 minutes plus the time for a full backup |
| Enterprise SSD (ESSD) | Approximately 20 minutes |
The primary instance is not affected during creation. After the read-only instance is created, a WAL Sender process starts on the primary instance to send WAL files to the read-only instance.
RDS for PostgreSQL uses snapshots to create read-only instances regardless of data volume.
View a read-only instance
From the instance list
-
Log on to the ApsaraDB RDS console, click Instances in the left navigation bar, and select a region.
-
Find the primary instance (marked with the
icon) and expand its dropdown list.
-
Click the ID of the read-only instance.
From the primary instance page
-
Go to the RDS instance list, select a region, and click the ID of the primary instance.
-
On the Basic Information page, hover over the read-only instance count and click a read-only instance ID.

Monitor replication latency
View the replication latency on the Basic Information page of the read-only instance.
Latency of 1 second or less is normal. Latency above 1 second indicates a delay, which may cause disconnection.
Limits
Constraints vary by the storage type of the primary instance.
| Constraint | Premium Local SSDs | Cloud disk |
|---|---|---|
| Maximum read-only instances | 5 | 32 |
| Architecture | High-availability (with standby node) | Single-node (no standby node) |
| Instance type requirement | Specifications and storage capacity must be greater than or equal to the primary instance | Specifications should be the same as the primary instance, or at least 50% of the primary instance specifications, to avoid replication latency and out-of-memory (OOM) errors |
| Storage capacity | Must be greater than or equal to the primary instance | Must be greater than or equal to the primary instance |
If the primary instance uses cloud disk storage and its memory exceeds that of a read-only instance, changing primary instance specifications restarts the read-only instance.
Memory capacity requirements
Minimum read-only instance memory depends on the primary instance memory.
| Primary instance memory | Minimum read-only instance memory |
|---|---|
| (0 GB, 64 GB] | At least 1/4 of the primary instance memory |
| (64 GB, 256 GB] | At least 1/6 of the primary instance memory |
| (256 GB, 9999 GB] | At least 1/8 of the primary instance memory |
Additional constraints
-
The storage type of a read-only instance matches the storage type of the primary instance.
-
You can create read-only instances, but you cannot convert existing RDS instances to read-only instances.
-
Read-only instances are billed separately under subscription or pay-as-you-go. Visit the ApsaraDB RDS buy page for pricing.
Single-node architecture has no standby node, so availability is not guaranteed. To improve availability, create multiple read-only instances and use libpq or JDBC for automatic failover (Automatic Failover and Read/Write Splitting), or use a database proxy for automatic read/write splitting.
API reference
| API | Description |
|---|---|
| CreateReadOnlyDBInstance | Creates a read-only instance. |
FAQ
Can I change the billing method of a read-only instance?
Yes. You can switch in either direction: Change from pay-as-you-go to subscription or Change from subscription to pay-as-you-go.
Does changing, releasing, or rebilling a read-only instance affect the primary instance?
No. Operations on a read-only instance have no impact on the primary instance.
Can I manage accounts on a read-only instance?
No. Accounts created on the primary instance are automatically synchronized to read-only instances with read-only permissions. Manage accounts on the primary instance only.
Can I convert a read-only instance into a regular instance?
No. Converting a read-only instance to a regular instance, such as a disaster recovery instance, is not supported.
Do I need to back up read-only instances?
No. Backups run on the primary instance using snapshot-based backups, which cause no performance overhead on the primary instance. Read-only instances do not need separate backups.
Does ApsaraDB RDS for PostgreSQL use parallel replication?
ApsaraDB RDS for PostgreSQL uses physical replication via WAL files for data synchronization and playback. This approach is more efficient than parallel replication.
How are transaction logs deleted?
After WAL files are backed up, AliPG clears the transaction logs during checkpointing.
What causes replication latency between a primary instance and a read-only instance?
Two common causes:
-
Specification mismatch: The primary instance has higher specifications than the read-only instance. Upgrade the read-only instance via Change configuration.
-
Misconfigured
max_standby_streaming_delayparameter: Too small reduces latency but may cancel read-only transactions. Too large increases latency. Adjust via Set instance parameters.