ALTER SYSTEM

Alter the system by setting or resetting the value of a specific configuration parameter.

ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' | DEFAULT }
ALTER SYSTEM RESET configuration_parameter
ALTER SYSTEM RESET ALL

You must be a superuser to run this command, and you cannot run it inside a transaction block.

Some parameter changes take immediate effect for new sessions. Some parameters require a database stop and restart (via ybcli commands) before the changes take effect.

You can also use the SET and ALTER ROLE commands to modify certain parameters.

Syntax

configuration_parameter
Specify a system configuration parameter that is modifiable. You can use the SHOW ALL command to return a list of parameters; however, not all of these are modifiable.
value
Specify a new value for the parameter, using a quoted string or a number, as appropriate for the parameter in question.
DEFAULT
Set the configuration parameter to its default value (equivalent to using RESET).
RESET | RESET ALL
Reset one or all configuration parameters to their default values.

Examples

The following commands will not take effect until the database has been restarted.
premdb=# alter system set idle_session_timeout to '30min';
ALTER SYSTEM
premdb=# alter system set idle_in_transaction_session_timeout to '15min';
ALTER SYSTEM