title | summary | toc |
---|---|---|
Cluster Settings |
Learn about cluster settings that apply to all nodes of a CockroachDB cluster. |
false |
This page shows you how to view and change CockroachDB's cluster-wide settings.
{{site.data.alerts.callout_info}}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.{{site.data.alerts.end}}
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 the root
user.
{{site.data.alerts.callout_danger}}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.{{site.data.alerts.end}}
{% include settings/v2.0/settings.md %}
Use the SHOW CLUSTER SETTING
statement.
Use the 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.
-
It's not recommended to change cluster settings upgrading to a new version of CockroachDB; wait until all nodes have been upgraded and then make the change.