Managing DWS Logical Clusters/Virtual Warehouses
Application Scenarios
- Binding Users to Logical Clusters/Virtual Warehouses: Bind users to logical clusters/virtual warehouses so that they can create tables and perform operations in the logical clusters/virtual warehouses.
- Procedure: Manage resources and load of a specified logical cluster/virtual warehouse, including resource pool configuration and concurrency control.
- Restarting a Logical Cluster or Compute Group: Restarting a logical cluster/virtual warehouse will restart all the DNs in them.
- Scaling Out a Logical Cluster/Virtual Warehouse: Add physical nodes to a logical cluster/virtual warehouse when existing nodes cannot meet increasing service requirements.
- Scaling In a Logical Cluster/Virtual Warehouse: Release idle physical nodes to reduce resource costs when service requirements decline.
- Querying Logical Clusters/Compute Groups: Query the list of logical clusters/virtual warehouses in the current system.
Binding Users to Logical Clusters/Virtual Warehouses
Assume that logical clusters/virtual warehouses lc1 and lc2 are available. Use the following syntax to bind new and existing users to the logical clusters/virtual warehouses.
- Connect to the DWS database and run the following statements to bind new users u1 and u2 to logical clusters/virtual warehouses lc1 and lc2, respectively:
1 2
CREATE USER u1 NODE GROUP "lc1" PASSWORD '{password}'; CREATE USER u2 NODE GROUP "lc2" PASSWORD '{password}';
- Connect to the DWS database and run the following statement to bind existing user u1 to logical cluster/virtual warehouse lc1:
1ALTER USER u1 NODE GROUP "lc1";
Run the following statement to query the logical cluster/virtual warehouse bound to a user:
1 | SELECT NODEGROUP FROM PG_USER WHERE usename = 'u1'; |
As shown in the following command output, user u1 is bound to logical cluster/virtual warehouse v3_logical.
Managing Workload in a Logical Cluster/Virtual Warehouse
Workload management allows you to control the usage of CPUs, memory, and I/O resources for different jobs, preventing a single job from consuming too many resources and affecting other services.
Precautions
- Workload management is supported only by logical clusters or virtual warehouses of version 8.1.3.x or later.
- When a physical cluster is converted to a logical cluster, the original resource pool configuration is cleared. You have to add the resource pool again if you want to configure it after the conversion.
Procedure
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the cluster list, click the name of the target cluster to go to the Cluster Information page.
- In the navigation pane, choose Logical Clusters or Compute Groups. In the Operation column of a logical cluster or compute group, click More and select Manage Workload. On the displayed page, you can manage resources in a logical cluster or compute group. For details, see DWS Resource Load Management.

Restarting a Logical Cluster or Compute Group
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the cluster list, click the name of the target cluster to go to the Cluster Information page.
- In the navigation pane, choose Logical Clusters or Compute Groups. Locate the row that contains the logical cluster or compute group you want to restart, click More in the Operation column, and select Restart.
- Click OK. Restarting a logical cluster/virtual warehouse will temporarily interrupt services in it. Public database objects (excluding system catalogs, foreign tables, and views) are distributed on all nodes in a physical cluster. After a node of the logical cluster is restarted, the DDL operations performed by other logical clusters on the objects will be interrupted. Restart the logical cluster/virtual warehouse during off-peak hours.
Scaling Out a Logical Cluster/Virtual Warehouse
Scaling out a logical cluster/virtual warehouse means adding physical nodes to the logical cluster/virtual warehouse and redistributing tables in the logical cluster/virtual warehouse among the added physical nodes.
Precautions
- Before a scale-out, you need to enable the logical cluster mode and add a logical cluster.
- The Data Node (DN) area displays the number of DNs and that of idle nodes in the current cluster. If there are no idle nodes, the cluster cannot be scaled out. To add idle nodes, click Add Idle Node. For details, see Scaling Out a Cluster.
- Storage-compute coupled logical clusters of 8.1.3 and later versions support online scale-out, and those of 8.2.1.100 and later versions support congested job termination.
- Logical clusters of 9.1.0.100 and later versions using the Storage-Compute Decoupled architecture support online scale-out, and those of 9.1.0.210 and later versions support congested job termination.
Procedure
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the navigation pane, choose Logical Clusters or Compute Groups. Locate the row that contains the logical cluster or compute group you want to scale out and click Scale Out in the Operation column.
- If the cluster meets inspection conditions before the scale-out, the Inspect area is displayed. Click Start inspection to perform an inspection. (To stop an inspection task, click Abort Task.) When an inspection is ongoing, the inspection progress is displayed. Ensure that the inspection is passed and click Next to perform the change. For details, see Viewing Inspection Results.
- On the displayed page, select the logical cluster/virtual warehouse you want to scale out. For details, see Scaling Out a Cluster.
- Confirm that all information is correct, select I acknowledge the potential risks and agree to proceed with the change, and click Submit.
Scaling In a Logical Cluster/Virtual Warehouse
Scaling in a logical cluster/virtual warehouse means removing physical nodes from the logical cluster/virtual warehouse and redistributing tables in the logical cluster/virtual warehouse among the remaining physical nodes after the scale-in.
Notes and Constraints
- A host ring with CN nodes cannot be scaled in.
- A host ring with GTM and CM nodes cannot be scaled in.
- Logical clusters of version 9.1.0.215 or later support online scale-in and redistribution concurrency configuration. The redistribution concurrency can be set to a value from 1 to 200. The default value is 4.
- Scale-in will redistribute tables and may affect service performance. Ensure that the remaining nodes after scale-in can handle workloads. Perform scale-in during off-peak hours.
Procedure
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the cluster list, click the name of the target cluster to go to the Cluster Information page.
- In the navigation pane, choose Logical Clusters or Virtual Warehouses. Locate the row that contains the logical cluster or virtual warehouse you want to scale in and click Scale In in the Operation column. Figure 2 Scaling in a logical cluster
- On the displayed page, select the logical cluster or compute group you want to scale in and the number of nodes to remove. For details, see Scaling In a Cluster.
If the cluster meets inspection conditions before the scale-in, the Inspection page is displayed. Click Start Inspection to perform an inspection. (To stop an inspection task, click Terminate Task.) When an inspection is ongoing, the inspection progress is displayed. Ensure that the inspection is passed and click Next to perform the change. For details, see Viewing Inspection Results.
- Confirm that the New Specifications are correct, select I understand the possible risks and expenditure changes and agree to proceed with the change, and click Submit.
Querying Logical Clusters/Compute Groups
You can query the logical cluster/virtual warehouse list on the Logical Clusters or Virtual Warehouses page of the DWS console or from the PGXC_GROUP system catalog.
Connect to the DWS database and run the following statement:
1 | SELECT * FROM PGXC_GROUP; |
What is your overall rating for this page?
Thank 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