CREATE NODE GROUP
Description
Creates a cluster node group.
Precautions
- CREATE NODE GROUP is an API of the cluster management tool.
- Only a system administrator has the permission.
Syntax
1 2 3 |
CREATE NODE GROUP groupname WITH ( nodename [, ... ] ) [ BUCKETS [ ( bucketnumber [, ... ] ) ] ]; |
Parameters
- groupname
Specifies the name of a node group.
Value range: a string. It must comply with the naming convention. A value can contain a maximum of 63 characters.
A node group name supports all ASCII characters, but you are advised to name a node group according to the naming convention.
- nodename
Node name.
Value range: a string. It must comply with the naming convention. A value can contain a maximum of 63 characters.
- BUCKETS [ ( bucketnumber [, ... ] ) ]
The BUCKETS clause is an internal use of the cluster management tool and can be called only during scale-out.
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 ); -- Query the node group. gaussdb=# SELECT group_name, group_members FROM pgxc_group; -- Delete the node group. gaussdb=# DROP NODE GROUP test_group;
Helpful Links
Feedback
Was this page helpful?
Provide feedbackThank 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