CREATE NODE GROUP
Function
CREATE NODE GROUP creates a cluster node group.
Precautions
- CREATE NODE GROUP is the internal interface encapsulated in gs_om.
- This interface is available only to administrators.
Syntax
1 2 3 4 5 6 |
CREATE NODE GROUP groupname WITH ( nodename [, ... ] ) [ BUCKETS [ ( bucketnumber [, ... ] ) ] ] [VCGROUP | FOR REPLICATION] [READ ONLY | READ WRITE] [DISTRIBUTE FROM src_group_name]; |
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.
- The strings optimal, query, bind, installation, elastic_group, roach_group, and random_node_group cannot be used as node group names.
- nodename
Specifies the node name.
Value range: a string. It must comply with the naming convention. A value can contain a maximum of 63 characters.
- BUCKETS [ ( bucketnumber [, ... ] ) ]
Is designed for internal use of the cluster management tools. You are not advised to use it directly. Otherwise, the cluster may be affected.
- VCGROUP
Creates a Node Group used as a logical cluster.
- FOR REPLICATION
Creates a replication table node group. A replication table node group can be created only in logical cluster mode. The specified node name must contain all nodes in one or more logical clusters and cannot contain nodes in any elastic cluster. A replication table node group is used to create replication tables across logical clusters. This node group can contain only replication tables. These replication tables are created on all CNs and DNs, but table data is written only to DNs in the node group. Replication table node groups can be created in 8.1.2 or later.
- READ ONLY
Creates a read-only node group. This option is supported only in 9.1.0 and later versions.
A read-only node group consists of only read-only nodes.
No objects can be created in a read-only node group. Only session-level volatile temporary tables can be created. (Local and global temporary tables are not supported.) Volatile temporary tables are automatically deleted after a session ends.
If a user bound to a read-only node group creates a regular or foreign table, the default table creation location is specified by the GUC parameter default_storage_nodegroup. It is also the default locations of tables created by users not bound to any logical groups. If default_storage_nodegroup is set to installation, the table will be created in the first logical cluster.
The restrictions for running DML statements in a read-only node group are as follows:
- Extensions are not supported.
- Triggers are not supported.
- User-defined operators are not supported.
- Temporary tables are not supported, but volatile temporary tables are supported. Volatile temporary tables can achieve higher performance.
- Resource management is not supported.
- User tables and system catalogs cannot be associated for query.
- READ WRITE
Creates a reader/writer node group. This option is supported only in 9.1.0 and later versions.
Generally, you do not need to specify the READ WRITE keyword. By default, the node group is a read/write node group.
- DISTRIBUTE FROM src_group_name
Creates a logical cluster node group or replication table node group to redistribute data from the logical cluster node group (or replication table node group) specified by src_group_name. The created node group will copy the authorization information from the source node group. If no logical cluster in the current cluster is performing redistribution, that is, no node group sets in_redistribution to y, the created node group will set in_redistribution to t, and the node group specified by src_group_name will set in_redistribution to y. This clause is used to scale in or out a logical cluster. Do not use this clause directly. Otherwise, data distribution errors may occur and the logical cluster may be unavailable.
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