Updated on 2024-07-18 GMT+08:00

Changing a DB Instance Class

Scenarios

You can change the instance class (vCPU or memory) of a DB instance as required. If the status of a DB instance changes from Changing instance class to Available, the change is successful.

Constraints

  • The instance class can be changed only when the DB instance is available.
  • The instance class of a DR instance cannot be changed.
  • A DB instance cannot be deleted when its instance class is being changed.
  • If a DB instance has a read replica, the new instance class must be no larger than the read replica class. When changing the read replica class, ensure that the selected class is no smaller than the DB instance class.
  • After the instance class is changed, some parameters are automatically changed to the default values defined in the new instance class. The parameters are max_connections, max_worker_processes, max_wal_senders, max_prepared_transactions, and max_locks_per_transaction.
  • After you change instance classes, the DB instances will be rebooted and services will be interrupted. You are advised to change instance classes during off-peak hours.
  • The time required for changing an instance class (during off-peak hours) is as follows:
    • This process takes 5 to 15 minutes.
    • When you are changing an instance class, service downtime only occurs during the primary/standby switchover. The duration of the downtime varies based on the replication delay and the number of temporary files.

Parameter Changes

After the instance class is changed, RDS will change the values of the following parameters accordingly:

  • shared_buffers
  • max_connections
  • maintenance_work_mem
  • effective_cache_size

For RDS for PostgreSQL 11 and later versions, in addition to the preceding parameters, the values of the following parameters will also be changed:

  • max_prepared_transactions
  • max_wal_size
  • work_mem

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, locate the target DB instance and choose More > Change Instance Class in the Operation column.

    Alternatively, click the target DB instance to go to the Basic Information page. In the DB Information area, click Change next to the Instance Class field.

  4. On the displayed page, specify the new instance class and click Next.
  5. Confirm the specifications.

    • If you need to modify your settings, click Previous.
    • For pay-per-use DB instances, click Submit.
    • For yearly/monthly DB instances:
      • If you intend to scale down the DB instance class, click Submit.

        The refund is automatically returned to your account. You can click Billing in the upper right corner and then choose Orders > My Orders in the navigation pane on the left to view the details.

      • If you intend to scale up the DB instance class, click Pay Now. The scaling starts only after the payment is successful.

  6. View the DB instance class change result.

    Return to the Instances page and view the instance status. During the change period, the instance status is Changing instance class. After a few minutes, click the DB instance and view its instance class on the displayed Basic Information page to check that the change is successful.