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.
Most parameter changes made with ALTER SYSTEM do not take effect until the database is stopped and restarted (via ybcli commands). This command modifies behavior for all future sessions on the system but not current sessions.
See also the SET, RESET, and ALTER ROLE commands.
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';
WARNING: Will be effective after the next server configuration reload, or after the next server restart in the case of parameters that can only be changed at server start
ALTER SYSTEM
premdb=# alter system set idle_in_transaction_session_timeout to '15min';
WARNING: Will be effective after the next server configuration reload, or after the next server restart in the case of parameters that can only be changed at server start
ALTER SYSTEM
Parent topic:SQL Commands