Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 3.77 KB

global-configurations.md

File metadata and controls

91 lines (62 loc) · 3.77 KB
title summary toc
Global Configurations
false

This page shows you how to view and change CockroachDB's global configurations. These configurations 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 are defined via SQL SET CLUSTER SETTING statements and can be updated anytime after a cluster has been started, but only by the root user.

{{site.data.alerts.callout_info}}In contrast to global configurations, node-level configurations 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}}

View Current Global Configurations

To view the current global configurations for a running cluster:

  1. Connect the built-in SQL client to any node of the cluster.

  2. Execute the SHOW ALL CLUSTER SETTINGS statement:

    > SHOW ALL CLUSTER SETTINGS;

Change a Global Configuration

Before changing a global configuration, please note the following:

  • {{site.data.alerts.callout_danger}}Many global configurations are intended for tuning CockroachDB internals. Before changing these settings, we strongly encourage you to discuss your goals with CockroachDB; otherwise, you use them at your own risk.{{site.data.alerts.end}}

  • Only the root user has privileges to change global configurations with SET CLUSTER SETTING.

  • Changing a global configuration is not instantaneous, as the change must be propagated to other nodes in the cluster.

  • It's not recommended to change global configurations while upgrading to a new version of CockroachDB (docs on online cluster upgrades coming soon); wait until all nodes have been upgraded and then make the change.

To change a global configuration for a running cluster:

  1. Connect the built-in SQL client to any node of the cluster.

  2. Execute the SET CLUSTER SETTING statement with the relevant setting name and value:

    > SET CLUSTER SETTING <setting name> = <setting value>;

See Also