All Products
Search
Document Center

ApsaraDB RDS:Storage capacity reduction for RDS PostgreSQL instances with disks

Last Updated:Jul 23, 2025

If your initially purchased storage space is too large and your actual usage is significantly lower than the storage capacity, you can use this feature to reduce the storage capacity to avoid wasting resources.

Note

After automatic storage expansion is enabled for RDS PostgreSQL, automatic reduction is not supported. However, you can use this feature to manually reduce the storage space after your business data decreases.

Prerequisites

  • The instance meets the following conditions:

    • Major version: PostgreSQL 10 or later

    • Storage type: enterprise SSD (ESSD) or premium performance disk

    Note
    • You can go to the Basic Information page of the instance to view the information above.

    • If you created a disk-based instance before October 10, 2022 (old architecture instance), you need to upgrade the minor engine version to the latest version before reducing the storage capacity. For more information, see Upgrade the minor engine version.

    • If your RDS instance uses a premium performance local disk, we recommend that you use the major version upgrade feature to upgrade the instance to a higher version with disk storage. This lets you reduce the storage capacity during the upgrade. For more information, see Upgrade the database major version.

  • Your Alibaba Cloud account does not have any unpaid renewal orders.

    You can go to the Orders page to check whether there are any unpaid orders, and then pay for or cancel them.

  • The instance status is running.

  • When reducing the storage capacity of a read-only instance, the status of its primary instance must be running.

Limits

Warning

Storage capacity reduction is not supported for instances that use logical replication. After the reduction task is completed, instances with logical replication enabled may experience loss of logical replication slots or removal of WAL logs, which can cause logical replication interruptions.

  • Manual disk capacity reduction can be performed up to 2 times per day to avoid service disruption caused by frequent reduction operations.

  • Reduction is allowed within the same series and architecture. The minimum space after reduction is calculated by the formula min{usage*1.3, usage+400 GB}, which must not be lower than the minimum storage space allowed for the current specification. The storage space adjustment step size is 5 GB.

    The minimum storage space allowed for each disk level is:

    • ESSD PL0: 10 GB

    • ESSD PL1: 20 GB

    • ESSD PL2: 500 GB

    • ESSD PL3: 1500 GB

    • Premium performance disk: 10 GB

    Storage capacity reduction examples

    Assume that the instance uses PL1 ESSD (minimum storage space is 20 GB) with a storage capacity of 2000 GB:

    • If the usage is 10 GB, the calculation result is 13 GB, which is lower than 20 GB. The minimum capacity after reduction is 20 GB.

    • If the usage is 500 GB, the calculation result is 650 GB. The minimum capacity after reduction is 650 GB.

    • If the usage is 1500 GB, the calculation result is 1900 GB. The minimum capacity after reduction is 1900 GB.

  • The storage space of a read-only instance must be greater than or equal to that of its primary instance. We recommend that you first reduce the storage space of the primary instance and then reduce the storage space of the read-only instance.

Impact

Disk capacity reduction causes a 30-second transient connection. During this period, most operations related to databases, accounts, and networks cannot be performed. We recommend that you perform the reduction operation during off-peak hours. Ensure that your application has a reconnection mechanism configured.

Billing

This operation involves billing changes. For more information, see Billing rules for configuration changes.

Procedure

Non-Serverless instances

  1. Visit the RDS instance list, select a region at the top, and then click the target instance ID.

  2. In the Configuration Information area, click Change Specifications.

  3. (Optional) If you have a subscription instance, in the dialog box that appears, click Downgrade, and click Next step.

  4. Slide the slider or click the minus icon to adjust the Storage Capacity.

    Note

    The minimum space after reduction is calculated by the formula min{usage*1.3, usage+400 GB}, which must not be lower than the minimum storage space allowed for the current specification. The storage space adjustment step size is 5 GB.

  5. Select Switching Time.

    Disk scale-in involves data migration. You can select Execute Immediately or Switch Within Maintenance Window as needed.

    • Execute Immediately: Starts the migration immediately without affecting the instance. A switchover is performed after the migration is complete, which will cause a transient connection.

    • Switch Within Maintenance Window: The migration starts immediately and the process does not affect the instance. The switchover is delayed until the specified maintenance window and causes a transient connection. For more information, see Set a maintenance window.

  6. Click Confirm Order. In the pop-up Instance Information Comparison window, confirm the change information and click Continue to complete the payment.

Serverless instances

  1. Visit the RDS instance list, select a region at the top, and then click the target instance ID.

  2. In the Instance Resources area, click Modify next to Storage Capacity.

  3. In the Modify tab, slide the slider or click the minus button to adjust the Storage Capacity, and then click OK.

    Note

    The minimum space after reduction is calculated by the formula min{usage*1.3, usage+400 GB}, which must not be lower than the minimum storage space allowed for the current specification. The storage space adjustment step size is 5 GB.

  4. In the Adjust Scaling Settings dialog box, confirm the upgrade or downgrade details and click Confirm.

    When the Status of the instance changes to Upgrading/Downgrading, a scale-in is in progress.

FAQ

  • Q: How long does the transient connection typically last during storage capacity reduction for RDS PostgreSQL instances with disks?

    A: The reduction causes a 30-second transient connection. During this period, most operations related to databases, accounts, and networks cannot be performed. We recommend that you perform the reduction operation during off-peak hours. Ensure that your application has a reconnection mechanism configured.

  • Q: How can I reduce the storage capacity of an RDS PostgreSQL instance with a standard SSD?

    A: Standard SSDs are no longer available for purchase and do not support capacity reduction. You can upgrade from a standard SSD to an enterprise SSD (ESSD) and then perform the capacity reduction. For more information, see [Notice] Some RDS instances no longer offer standard SSDs for purchase from July 1, 2022.

References

  • To modify other configurations of the instance, see Change configurations.

  • You can modify the storage space and other instance configurations through API.

    API

    Description

    ModifyDBInstanceSpec

    When reducing disk storage capacity, you need to modify the DBInstanceStorage parameter value to the target space value after reduction. Configure other parameters as needed.