This topic describes how to change the specifications of a PolarDB for PostgreSQL cluster.
Prerequisites
You can change the specifications of a cluster only if no other specification change is in progress.
Background
PolarDB supports capacity scaling in three dimensions:
-
Vertical scaling of compute resources: Scale cluster specifications up or down.
-
Horizontal scaling of compute resources: Add or remove read-only nodes. For more information, see Add or remove nodes.
-
Horizontal scaling of storage: Depending on the storage type and billing method, storage automatically scales as your data volume changes. You can also manually scale up storage. For more information, see Manually scale up storage.
Billing for configuration changes
For pricing details, see Billing for specification changes.
Usage notes
-
For a centralized PolarDB for PostgreSQL cluster (whose Database Edition is Enterprise Edition or Standard Edition), you can scale up or scale down the specifications of the entire cluster or a single node in the cluster.
NoteWhen scaling the specifications of a single node, ensure that one read-only node has the same specifications as the primary node. You can configure the specifications of other nodes as needed.
-
For a PolarDB for PostgreSQL (Distributed Edition) cluster, you can change specifications only in a uniform manner for all compute nodes (CNs) or all data nodes (DNs). You cannot change the specifications of a single compute node or data node, nor can you change the specifications of an individual read-write (RW) or read-only (RO) node within a compute or data node.
-
Changing specifications takes about 5 minutes per compute node. For example, changing the specifications for a two-node cluster takes about 10 minutes. The total duration also depends on factors such as database load and the number of databases and tables.
-
Scaling cluster specifications up or down does not affect the existing data in the cluster.
-
During a specification change, a connection disruption of up to 30 seconds may occur for each connection endpoint. Perform this operation during off-peak hours and ensure your application has an automatic reconnection mechanism.
Procedure
Select a method to change specifications based on your cluster type.
Centralized PolarDB for PostgreSQL cluster
A centralized PolarDB for PostgreSQL cluster is a cluster whose Database Edition is Enterprise Edition or Standard Edition.
-
Log in to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where the cluster is located, and then find the target cluster.
-
Navigate to the Change Configurations page using one of the following methods:
-
Find the target cluster and click Operation in the Change Configurations column.
-
Find the target cluster and click its ID. At the bottom of the Basic Information page, click Change Configurations.
-
-
Select Upgrade or Downgrade and click OK.
The upgrade or downgrade takes effect in about 10 minutes. During this process, a connection disruption of up to 30 seconds may occur for each connection endpoint. For an upgrade, you can choose to Switch Now or Switch At a scheduled time.
NoteOnly subscription clusters support Temporary Upgrade. For more information, see Temporary Scale-up.
-
On the Change Specifications page, set the following parameters:
Parameter
Description
Specification type
Select the new specification type. Options are General-purpose and Dedicated.
Node specification
Select the new node specification.
NoteEnsure that one read-only node has the same specifications as the primary node. You can configure the specifications of other nodes as needed.
Switching time
You can set Switching Time to Switch Now or Switch At.
If you select Switch At, you can choose any time within the next 24 hours. The upgrade task will be completed within 30 minutes after the specified time. You can view task details or cancel the task on the Scheduled tasks page. For more information, see Scheduled tasks.
-
Complete the payment based on the Commodity Type of the cluster.
-
Pay-As-You-Go
Click Buy Now. By doing this, you acknowledge and agree to the service agreement and any product-specific terms you have selected on this page.
-
Subscription
-
Click Buy Now. By doing this, you acknowledge and agree to the service agreement and any product-specific terms you have selected on this page.
-
On the Pay page, confirm the unpaid order information and payment method, and then click Pay.
-
NoteThe specification change takes effect in about 10 minutes.
-
PolarDB for PostgreSQL (Distributed Edition) cluster
-
Log in to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where the cluster is located, and then click the cluster ID to go to its details page.
-
In the Configuration Information section, click Upgrade or Downgrade based on your requirements.
-
On the Change Specifications page, set the following parameters:
Parameter
Description
Specification type
Select the new specification type. Options are General-purpose and Dedicated.
Node specification
Select the new node specification.
NoteYou can change specifications only in a uniform manner for all compute nodes (CNs) or all data nodes (DNs). You cannot change the specifications of a single compute node or data node, nor can you change the specifications of an individual read-write (RW) or read-only (RO) node within a compute or data node.
Switching time
You can set Switching Time to Switch Now or Switch At.
If you select Switch At, you can choose any time within the next 24 hours. The upgrade task will be completed within 30 minutes after the specified time. You can view task details or cancel the task on the Scheduled tasks page. For more information, see Scheduled tasks.
-
Complete the payment based on the Commodity Type of the cluster.
-
Pay-As-You-Go
Click Buy Now. By doing this, you acknowledge and agree to the service agreement and any product-specific terms you have selected on this page.
-
Subscription
-
Click Buy Now. By doing this, you acknowledge and agree to the service agreement and any product-specific terms you have selected on this page.
-
On the Pay page, confirm the unpaid order information and payment method, and then click Pay.
-
NoteThe specification change takes effect in about 10 minutes.
-
API reference
|
API |
Description |
|
Changes the node specifications of a PolarDB cluster. |