Updated on 2026-07-08 GMT+08:00

Managing DWS Logical Clusters

Binding Users to Logical Clusters

Assume that logical clusters lc1 and lc2 are available. Use the following syntax to bind new and existing users to the logical clusters.

  • Connect to the DWS database and run the following statements to bind new users u1 and u2 to logical clusters 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 lc1:
    1
    ALTER USER u1 NODE GROUP "lc1";
    

Run the following statement to query the logical cluster 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 v3_logical.

Figure 1 Binding a user to a logical cluster

Editing a Logical Cluster

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Cluster > Cluster List.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the navigation pane, choose Logical Clusters. In the Operation column of a logical cluster, click Edit.

  5. Add a node to the logical cluster by moving the selected ring from the right to the left, or remove a node from the logical cluster by moving the selected ring from the left to the right, and click OK.

    • Nodes are added to or removed from a logical cluster by ring.
    • At least one ring must be reserved in a logical cluster.
    • The ring removed from the logical cluster will be added to the elastic cluster.

  6. When adding a node, select online or offline scale-out as needed. You can set Redistribution Concurrency to a number from 1 to 200. The default value is 4.
  7. If you select online scale-out, you can configure job termination. When job termination is enabled and there is congestion during online scale-out, the system will wait for the specified duration before terminating the congested jobs. The duration value must be an integer ranging from 30 to 1200.
  8. Click OK.

Managing Resources (in a Logical Cluster)

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Cluster > Cluster List.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the navigation pane, choose Logical Clusters. In the Operation column of a logical cluster, click Resource Management. On the displayed page, you can manage resources in a logical cluster. For details, see DWS Resource Load Management.

    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.

Restarting Logical Clusters

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Cluster > Cluster List.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the navigation pane, choose Logical Clusters. Locate the row that contains the logical cluster to be restarted, click More in the Operation column, and select Restart.
  5. Click OK.

Scaling Out a Logical Cluster

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Cluster > Cluster List.
  3. In the cluster list, locate the row that contains the target cluster, click More in the Operation column, and choose Scale Node > Scale Out. (When editing the logical cluster, select the online/offline scale-out option.)

    Before scaling out the cluster, it is crucial to verify if it meets the inspection conditions. Click Immediate Inspection and click OK in the dialog box to complete the inspection and proceed to the next step only if it passes. For more information, see Viewing Inspection Results.

  4. On the Scale Out page, select the target logical cluster. You can set Redistribution Concurrency to a value from 1 to 200. The default value is 4. If online scale-out is enabled, congested jobs will be terminated. When there is congestion during online scale-out, the system will wait for the specified duration before terminating the congested jobs. The duration value must be an integer ranging from 30 to 1,200.

    • Before a scale-out, you need to enable the logical cluster mode and add a logical 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.

  5. Confirm the settings, select I agree, and click Next: Confirm. On the displayed page, you can view the node specifications, scale-out mode, billing information, and the number of nodes before and after the scale-out.
  6. Confirm all configurations and click Submit. In the displayed dialog box, click OK to start the scale-out.

Scaling In a Logical Cluster

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Cluster > Cluster List.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the navigation pane, choose Logical Clusters. Locate the target elastic pool and click Edit in the Operation column. (After moving the selected ring from the left to the right, the nodes are deleted from the elastic pool.)

    • 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 and 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.
    • If the cluster name is not elastic_group, you can move nodes to the elastic_group cluster or outside the current cluster. If the cluster name is elastic_group, the nodes removed from the cluster will be released. During a cluster scale-in, nodes can be directly moved out of the cluster. This function is supported only by clusters of version 9.1.1 or later. If this function is not supported, contact technical support.
    Figure 2 Scaling in a logical cluster

  5. Click OK.

Querying Logical Clusters

You can query the logical cluster list on the Logical Clusters 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;
Figure 3 Querying logical clusters