When free storage space on an ApsaraDB RDS for PostgreSQL instance drops below a threshold you set, automatic storage scaling expands the storage without manual intervention. This prevents storage exhaustion from causing database downtime.
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB RDS for PostgreSQL instance that uses cloud disks and is in the Running state
An account with a sufficient balance to cover scaling costs
Billing
Scaling costs follow the same billing rules as a manual storage upgrade. For details, see Upgrade/Downgrade billing rules.
Before you enable automatic scaling
Check WAL logs first. High Write-Ahead Logging (WAL) usage is a common cause of storage exhaustion in PostgreSQL. Use the WAL Log Management feature to identify and delete inactive replication slots. This allows the RDS PostgreSQL kernel to automatically clear WAL logs. After WAL cleanup, reassess whether storage space is still insufficient before enabling automatic scaling.
Enable automatic storage scaling
Go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.
In the Instance Resources section, click Settings next to Automatic Storage Expansion.
Configure the following parameters.
Parameter Description Automatic Storage Scaling Toggle to enable or disable automatic storage scaling. Available Storage <= The free storage threshold (as a percentage) that triggers scaling. When free storage drops to or below this value, the system adds storage. The amount added is the larger of: 5 GB, or 15% of the current storage capacity rounded to the nearest multiple of 5 GB. If total storage is less than 50 GB and free storage is below 10%, the scaling step size is 10 GB instead. Maximum Storage Capacity The upper limit for storage after automatic scaling. Must be greater than or equal to the current storage. Maximum values: 32,000 GB for enterprise SSD (ESSD), 6,000 GB for standard SSD. Click OK.
Limitations
Backup delays scaling. If the instance is being backed up when scaling is triggered, the scaling task starts after the backup completes.
Read-only instances scale first. Starting February 28, 2023, when automatic scaling is triggered on a primary instance that has read-only instances, the system checks each read-only instance's storage. If a read-only instance has less storage than the primary instance's target capacity, it scales out first. The primary instance scales out only after all read-only instances have scaled. For details, see [Product/Feature Change] Optimization of automatic storage scaling rules for ApsaraDB RDS for MySQL and ApsaraDB RDS for PostgreSQL instances.
View scaling history
Go to the Instances page, select the region, find the instance, and click its ID.
In the Instance Resources section, click Storage Expansion Records to the right of Automatic Storage Expansion. This opens the Database Autonomy Service (DAS) console.
On the Autonomy Center page, set Type to Auto Scaling Events to see a list of triggered scaling events.
Click Details for an event to see its scaling information.
FAQ
How long does storage scaling take?
Scaling time varies and cannot be predicted precisely — it depends on factors such as instance workload and data volume. To track progress, go to Task Hub.
API reference
| API | Description |
|---|---|
| ModifyDasInstanceConfig | Configure automatic storage scaling for an instance. |