All Products
Search
Document Center

ApsaraDB RDS:Reduce the storage capacity of an ApsaraDB RDS for PostgreSQL instance that uses ESSDs

Last Updated:May 10, 2023

This topic describes how to manually reduce the storage capacity of an ApsaraDB RDS for PostgreSQL instance that uses enhanced SSDs (ESSDs).

Scenarios

  • The actual storage usage is much smaller than the storage capacity that you purchased when you create the RDS instance. To prevent resource waste, you can use the manual storage reduction feature to reduce the storage capacity.

  • The automatic storage expansion feature is enabled for your RDS instance. However, automatic storage reduction is not supported. After the workloads are reduced, you can use the manual storage reduction feature to reduce the storage capacity.

Prerequisites

  • Your RDS instance meets the following requirements:

    • The RDS instance runs PostgreSQL 10 or later.

    • The RDS instance uses ESSDs. ESSDs come in the following performance levels (PL): PL1, PL2, and PL3.

    • The RDS instance runs RDS Basic Edition or RDS High-availability Edition.

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

    • You cannot reduce the storage capacity of a serverless RDS instance that uses ESSDs.

    • If your RDS instance was created before October 10, 2022 and uses ESSDs, manual storage reduction is not supported. RDS instances that were created before October 10, 2022 use the original architecture. For more information, see [Notice] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022.

    • If your RDS instance uses local disks, we recommend that you use the major version upgrade feature to upgrade the RDS instance to an instance that runs a later major engine version and uses cloud disks. You can reduce the storage capacity of your RDS instance when you upgrade the major engine version. For more information, see Upgrade the major version of an ApsaraDB RDS for PostgreSQL instance.

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

    You can go to the Orders page to check whether unpaid orders exist. If an unpaid order exists, you must complete the payment or cancel the order.

  • The RDS instance is in the Running state.

  • When you reduce the storage capacity of a read-only RDS instance, the primary RDS instance of the read-only RDS instance is in the Running state.

Limits

  • You can manually reduce the storage capacity of an RDS instance that uses cloud disks up to twice a day. This prevents your services from being negatively affected.

  • You can reduce the storage capacity of your RDS instance without the need to change the RDS edition or architecture of the RDS instance. The minimum storage capacity after the storage capacity reduction must be greater than or equal to the minimum storage capacity that is supported by the instance type of the RDS instance. You can use the following formula to calculate the minimum storage capacity to which you can reduce your RDS instance: min{Used storage × 1.3, Used storage + 400 GB}. You can reduce the storage capacity at a step size of 5 GB.

    The following list describes the minimum storage capacity that is allowed for each performance level (PL) of ESSDs:

    • PL1 ESSD: 20 GB

    • PL2 ESSD: 500 GB

    • PL3 ESSD: 1,500 GB

    Examples

    Your RDS instance provides 2,000 GB of storage capacity and uses the PL1 ESSD storage type.

    • If 10 GB of storage is used, the value obtained by using the preceding formula is 13 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 20 GB.

    • If 500 GB of storage is used, the value obtained by using the preceding formula is 650 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 650 GB.

    • If 1,500 GB of storage is used, the value obtained by using the preceding formula is 1,900 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 1,900 GB.

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

Impacts

When you reduce the storage capacity of your RDS instance that uses ESSDs, a 30-second transient connection occurs. During the transient connection, you cannot perform most of the operations that are related to databases, accounts, and network settings. We recommend that you reduce the storage capacity of your RDS instance that uses ESSDs during off-peak hours. Make sure that your application is configured to automatically reconnect to your RDS instance.

Billing rules

For more information about billing rules, see Specification changes.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the Configuration Information section of the page that appears, click Change Specifications.

  3. Optional. In the dialog box that appears, click Downgrade and click Next step. This step is required only when the RDS instance uses the subscription billing method.

  4. Drag the slider or click the minus icon to specify a new value for the Capacity parameter.

    Note

    The minimum storage capacity to which you can reduce your RDS instance is calculated by using the following formula: min{Used storage × 1.3, Used storage + 400 GB}. The minimum storage capacity after the storage capacity reduction must be greater than or equal to the minimum storage capacity that is supported by the instance type of the RDS instance. You can reduce the storage capacity at a step size of 5 GB.

  5. Configure the Switching Time parameter.

    Storage capacity reduction requires data migration. You can set this parameter to Switch Immediately After Data Migration or Switch Within Maintenance Window.

    • Switch Immediately After Data Migration: Your data is immediately migrated, which does not affect workloads on the RDS instance during the migration. After the data is migrated, the system switches over your workloads. A transient connection occurs during the switchover.

    • Switch Within Maintenance Window: Your data is immediately migrated, which does not affect workloads on the RDS instance. After the data is migrated, the system switches your workloads within the maintenance window. A transient connection occurs during the switchover. For more information, see Set the maintenance window of an ApsaraDB RDS for PostgreSQL instance.

  6. Read and accept the Terms of Service and click Pay Now.

  7. In the Instance Information Comparison dialog box, confirm the instance information before and after the specification change and click Continue to complete the payment.

FAQ

When I reduce the storage capacity of my RDS instance that uses ESSDs, how long does a transient connection last?

The transient connection lasts for approximately 30 seconds. During the transient connection, you cannot perform most of the operations that are related to databases, accounts, and network settings. We recommend that you reduce the storage capacity of your RDS instance that uses ESSDs during off-peak hours. Make sure that your application is configured to automatically reconnect to your RDS instance.

Related operations

API

Operation

ModifyDBInstanceSpec

Reduces the storage capacity of an instance. When you call the ModifyDBInstanceSpec operation to reduce the storage capacity of an instance that uses ESSDs, you must change the value of the DBInstanceStorage parameter to the new storage capacity. You can configure other parameters based on your business requirements.