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
- You can change the DB instance class only when your account balance is greater than or equal to $0 USD.
- 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.
- You can scale up or down the compute and memory capacity of RDS for PostgreSQL DB instances as required.
- 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.
To change a read replica to an instance class smaller than that of the primary instance, you need to contact customer service to apply for required permissions.
- 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_worker_processes, max_wal_senders, max_prepared_transactions, and max_locks_per_transaction.
- After the instance class is changed, the value of max_connections is the larger one between the default value defined in the new instance class and the value specified in the current instance.
- 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.
- If the change takes an extended period of time, contact customer service.
Billing
Billing Mode |
Operation |
Impact on Fees |
---|---|---|
Yearly/Monthly |
Instance class upgrade |
After an instance class is upgraded, the new instance class takes effect in the original usage period. You need to pay for the difference in price based on the remaining period. The following prices are for reference only. The actual prices are subject to the price displayed on the console. Suppose you purchased a one-month RDS for PostgreSQL 14 single DB instance (instance class: general-purpose, 2 vCPUs | 8 GB; storage: cloud SSD, 40 GB) in CN-Hong Kong on June 1, 2023. The instance price was $59.56 USD per month. On June 15, 2023, you changed the instance class to 4 vCPUs | 8 GB. The instance price became $121.56 USD per month. Price difference of upgrade = Price for the new instance class × Remaining period - Price for the original instance class × Remaining period The remaining period is the remaining days of each calendar month divided by the maximum number of days in each calendar month. In this example, the remaining period and price difference are calculated as follows: Remaining period = 15 (Remaining days in June)/30 (Maximum number of days in June) = 0.5 Price difference of the upgrade = $121.56 USD x 0.5 - $59.56 USD x 0.5 = $31 USD |
Instance class downgrade |
After an instance class is downgraded, the new instance class takes effect in the original usage period. RDS refunds the difference in price based on the remaining period. The following prices are for reference only. The actual prices are subject to the price displayed on the console. Suppose you purchased a one-month RDS for PostgreSQL 14 single DB instance (instance class: general-purpose, 2 vCPUs | 8 GB; storage: cloud SSD, 40 GB) in CN-Hong Kong on June 1, 2023. The instance price was $59.56 USD per month. On June 15, 2023, you changed the instance class to 2 vCPUs | 4 GB. The instance price became $50.56 USD per month. Refunded fees = Price for the original instance class × Remaining period - Price for the new instance class × Remaining period The remaining period is the remaining days of each calendar month divided by the maximum number of days in each calendar month. In this example, the remaining period and refunded fees are calculated as follows: Remaining period = 15 (Remaining days in June)/30 (Maximum number of days in June) = 0.5 Refunded fees = $59.56 USD x 0.5 - $50.56 USD x 0.5 = $4.5 USD |
|
Pay-per-use |
Instance class upgrade |
After an instance class is changed, the new instance class is billed by hour. For details, see Product Pricing Details. |
Instance class downgrade |
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
- Log in to the management console.
- Click in the upper left corner and select a region.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, locate the target DB instance and choose More > Change Instance Class in the Operation column.
Alternatively, click the instance name to go to the Overview page. Under Instance Class, click Configure.
- On the displayed page, specify the new instance class and click Next.
Figure 1 Changing a DB instance class
DB instances in a DCC only support the general-enhanced instance class.
- Confirm the specifications.
- If you need to modify your settings, click Previous.
- For pay-per-use DB instances, click Submit.
To view the cost incurred by the DB instance class change, choose
in the upper right corner. - 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.
- If you intend to scale down the DB instance class, click Submit.
- 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 Overview page to check that the change is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot