Updated on 2025-05-29 GMT+08:00

DROP NODE GROUP

Description

Deletes a node group.

Precautions

  • DROP NODE GROUP is an API of the cluster management tool.
  • Only the system administrator or a user who has the DROP permission can perform this operation.

Syntax

1
2
DROP NODE GROUP groupname 
    [TO ELASTIC GROUP];

Parameters

groupname

Specifies the name of the node group to be deleted.

Value range: an existing node group name

Examples

-- Query the initial cluster DN status.
gaussdb=# SELECT node_name, nodeis_preferred FROM pgxc_node WHERE node_type = 'D' ORDER BY 1;
 node_name | nodeis_preferred
-----------+------------------
 dn_6001_6002_6003 | f
 dn_6004_6005_6006 | f
 dn_6007_6008_6009 | f
(3 rows)

-- Create a node group and replace dn_6001_6002_6003 with the actual node name obtained in the previous step.
gaussdb=# CREATE NODE GROUP test_group WITH ( dn_6001_6002_6003 );

-- Delete the node group.
gaussdb=# DROP NODE GROUP test_group;