Cluster settings apply to all nodes of a CockroachDB cluster and control, for example, whether or not to share diagnostic details with Cockroach Labs as well as advanced options for debugging and cluster tuning.
They can be updated anytime after a cluster has been started, but only by a member of the
admin role, to which the
root user belongs by default.
In contrast to cluster-wide settings, node-level settings apply to a single node. They are defined by flags passed to the
cockroach start command when starting a node and cannot be changed without stopping and restarting the node. For more details, see Start a Node.
Many cluster settings are intended for tuning CockroachDB internals. Before changing these settings, we strongly encourage you to discuss your goals with Cockroach Labs; otherwise, you use them at your own risk.
View current cluster settings
SHOW CLUSTER SETTING statement.
Change a cluster setting
SET CLUSTER SETTING statement.
Before changing a cluster setting, please note the following:
Changing a cluster setting is not instantaneous, as the change must be propagated to other nodes in the cluster.
Do not change cluster settings while upgrading to a new version of CockroachDB. Wait until all nodes have been upgraded before you make the change.
SET CLUSTER SETTING
SHOW CLUSTER SETTING
- Diagnostics Reporting
- Start a Node
- Use the Built-in SQL Client