Updated on 2025-07-30 GMT+08:00

Managing 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 Dedicated Clusters > Clusters.
  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 and click Edit in the Operation column of the target cluster.

  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.
  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 Dedicated Clusters > Clusters.
  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 the logical cluster. For details, see GaussDB(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 a Logical Cluster

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

Scaling Out a Logical Cluster

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Dedicated Clusters > Clusters.
  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. Alternatively, click Edit in the Operation column and select the online/offline scale-out option (see Editing a Logical Cluster for details).

    Before scaling out the cluster, it is crucial to verify if it meets the inspection conditions. Click Immediate Inspection 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 a logical or elastic cluster. Enabling online scale-out also allows you to enable congested job termination. If congestion occurs during online scale-out and job termination is enabled, the system will wait for the specified duration before terminating congested jobs. The duration value must be an integer between 30 and 1200.

    • 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. storage-compute decoupled logical clusters of 9.1.0.100 or later support online scale-out.

Scaling In a Logical Cluster

  1. Log in to the DWS console.
  2. In the navigation pane on the left, choose Dedicated Clusters > Clusters.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the navigation pane on the left, switch to the Logical Clusters page. Locate the row that contains the target elastic pool and click Edit in the Operation column to delete nodes from the elastic pool (move the selected ring from the left to the right).

    • 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.
    • If the cluster name is not elastic_group, the node joins the elastic_group cluster. If the cluster name is elastic_group, the node is removed.

  5. Click OK.

Querying the Logical Cluster List

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 2 Querying the logical cluster list