SET CLUSTER SETTING statement modifies a cluster-wide setting.
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
MODIFYCLUSTERSETTINGsystem-level privilege granted.rootandadminusers have this system-level privilege by default and are capable of granting it to other users and roles using theGRANTstatement. For example to grant this system-level privilege to usermaxroach: -
Have the
MODIFYSQLCLUSTERSETTINGsystem-level privilege granted. Users with this privilege are allowed to modify onlysql.defaults.*cluster settings, not all cluster settings.
Synopsis
Parameters
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
ALTER ROLE ALL SET {sessionvar} = {val} instead of the sql.defaults.* cluster settings. This allows you to set a default value for all users for any session variable that applies during login, making the sql.defaults.* cluster settings redundant.
