When a database instance runs out of storage, writes fail—leading to data loss or a full database outage. Database Autonomy Service (DAS) monitors storage usage and automatically expands the storage capacity of ApsaraDB RDS for PostgreSQL instances when usage reaches a threshold you define. Expansion happens without restarting the instance and without disrupting your services.
For ApsaraDB RDS for MySQL and ApsaraDB RDS for SQL Server instances, see Automatic space expansion.
How it works
Automatic storage expansion triggers when the used storage space of an instance meets or exceeds the threshold you configure (50–90%). When triggered, DAS expands storage by the larger of these two values:
5 GB (adjusted to 10 GB if the instance is smaller than 50 GB and available storage is below 10% of total capacity)
15% of the current storage capacity, rounded to the nearest integer that is a multiple of 5
Two consecutive expansions require at least a 10-minute interval.
Read-only instance behavior (from February 28, 2023): If the primary instance has read-only instances, DAS checks each read-only instance's storage when expansion is triggered. If any read-only instance has less storage than the target capacity of the primary instance, DAS expands the read-only instances first, then expands the primary instance. For details, see [Notice] Optimization of automatic storage expansion for ApsaraDB RDS for MySQL instances and ApsaraDB RDS for PostgreSQL instances.
Prerequisites
Before you begin, make sure that:
Your instance is an ApsaraDB RDS for PostgreSQL instance that uses standard SSDs or Enterprise SSDs (ESSDs), and is in a supported region. Automatic storage expansion depends on the anomaly detection feature, which is available in: China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UAE (Dubai), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)
Your Alibaba Cloud account balance is sufficient to cover the cost of storage expansion
The service-linked role AliyunServiceRoleForDAS exists. If it doesn't, DAS creates it automatically before the first expansion. For details, see AliyunServiceRoleForDAS role
Limitations
No automatic scale-down: Once storage is expanded, it cannot be reduced automatically. To reduce storage, change the instance specifications manually. For details, see Change instance specifications.
Backup in progress: If the instance is being backed up when expansion is triggered, the expansion task is postponed until the backup completes.
Billing
Automatic storage expansion is billed the same way as manually expanding storage for ApsaraDB RDS instances. For details, see Change instance specifications.
Configure automatic storage expansion
You can add an automatic storage expansion policy from the Auto Scaling Settings page (manage policies across multiple instances) or from the instance details page (configure a single instance).
Option 1: Add a policy from Auto Scaling Settings
Log on to the DAS console.
In the left-side navigation pane, choose Resources > Auto Scaling Settings.
In the Auto Scaling Policies section, click Add Policy.
In the Add Policy panel, configure the following parameters.
Parameter Description Policy Name A name for the policy. Mode Select Automatic Storage Expansion. Engine Type Set to RDS PostgreSQL. Specifications Set to Disks. Used Storage Space ≥ The storage usage threshold that triggers expansion. Valid values: 50–90. Default: 50. Unit: percentage. Maximum Storage The upper limit for storage after expansion. Must be greater than or equal to the current total storage capacity. For ESSD instances, the maximum is 32,000 GB. For standard SSD instances, the maximum is 6,000 GB. Click Next Step.
In the Apply Policies dialog box, select the instances to apply the policy to, and click the
icon.Click Confirm.
Option 2: Add a policy from the instance details page
Log on to the DAS console.
In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.
Find the target instance and click its instance ID.
On the instance details page, click Autonomy Service Settings in the upper-right corner.
In the Autonomous Function Management panel, click the Autonomous Function Settings tab, then click the Auto Scaling tab.
Click Add Policy. In the Add Policy panel, configure the parameters as described in Option 1, step 4.
In the Recommended Policies section, find the policy and click Apply in the Actions column. To remove a policy from this instance, find it in the Applied Policies section and click Cancel in the Actions column.
Click OK.
In the Alert Configuration section, configure an alert template and subscribe to alert notifications to monitor expansion events. The system automatically creates an alert template with alert rules for the relevant autonomy events. For configuration details, see Configure alert templates and Configure alert rules.
In the Select Contact Group section, select an alert contact group. For details, see Manage alert contacts.
Click Add Contact to add an alert contact.
Click Create Contact Group to create a contact group.
To edit or remove an existing contact, click Edit or Remove in the Actions column.
Click Submit Configuration and confirm.
View expansion results
In the left-side navigation pane of the DAS console, choose Intelligent O&M Center > Instance Monitoring.
Find the target instance and click its instance ID.
In the left-side navigation pane of the instance details page, click Autonomy Center.
On the Autonomy Center page, select a time range to view auto scaling events.
In the Elastic Scaling Events section, click Details to view the details of each expansion event.
