SET CLUSTER SETTING modifies a .
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.
Required privileges
To use theSET CLUSTER SETTING statement, a user must have one of the following attributes:
-
Be a member of the
adminrole. (By default, therootuser belongs to theadminrole.) -
Have the
MODIFYCLUSTERSETTINGgranted.rootand users have this system-level privilege by default and are capable of granting it to other users and roles using the statement. For example to grant this system-level privilege to usermaxroach: -
Have the
MODIFYSQLCLUSTERSETTINGgranted. Users with this privilege are allowed to modify only , not all cluster settings.
Synopsis
The
SET CLUSTER SETTING statement is unrelated to the other and statements.Parameters
| Parameter | Description |
|---|---|
var\_name | The name of the (case-insensitive). |
var\_value | The value for the . |
DEFAULT | Reset the to its default value. The resets a cluster setting as well. |
Examples
Change the default distributed execution parameter
To configure a cluster so that new sessions automatically try to run queries in a distributed fashion:Use instead of the
sql.defaults.* . This allows you to set a default value for all users for any that applies during login, making the sql.defaults.* cluster settings redundant.
