SET CLUSTER SETTING

On this page Carat arrow pointing down
Warning:
CockroachDB v1.0 is no longer supported. For more details, see the Release Support Policy.

The SET CLUSTER SETTING statement modifies a cluster-wide setting.

Warning:
Many cluster settings 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.

Synopsis

SET CLUSTER SETTING var_name TO = var_value , DEFAULT
Note:
The SET CLUSTER SETTING statement is unrelated to the other SET TRANSACTION and SET (session variable) statements.

Required Privileges

Only the root user can modify cluster settings.

Parameters

Parameter Description
var_name See the description of cluster settings.

The variable name is case-insensitive.

Examples

Change the Default Distributed Execution Parameter

You can configure a cluster so that new sessions automatically try to run queries in a distributed fashion:

> SET CLUSTER SETTING sql.defaults.distsql = 1;

You can also disable distributed execution for all new sessions:

> SET CLUSTER SETTING sql.defaults.distsql = 0;

Disable Automatic Diagnostic Reporting

You can opt out of automatic diagnostic reporting of usage data to Cockroach Labs using the following:

> SET CLUSTER SETTING diagnostics.reporting.enabled = false;
> SHOW CLUSTER SETTING diagnostics.reporting.enabled;
+-------------------------------+
| diagnostics.reporting.enabled |
+-------------------------------+
| false                         |
+-------------------------------+
(1 row)

See Also


Yes No
On this page

Yes No