ALTER SYSTEM(7)

NAME
ALTER_SYSTEM - change a server configuration parameter

SYNOPSIS

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

DESCRIPTION

ALTER SYSTEM writes the configuration parameter values to the postgresql.auto.conf file. Setting the parameter to DEFAULT, or using the RESET variant, removes the configuration entry from postgresql.auto.conf file. Use RESET ALL to clear all configuration entries. The values will be effective after reload of server configuration (SIGHUP) or in next server start based on the type of configuration parameter modified.

This command is not allowed inside transaction block or function.

See Section 18.1, “Setting Parameters”, in the documentation for other ways to set the parameters and how they become effective.

PARAMETERS

configuration_parameter
    Name of a settable run-time parameter. Available parameters are documented in Chapter 18, Server Configuration, in the documentation.

value
    New value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter. DEFAULT can be written to specify to remove the parameter and its value from postgresql.auto.conf

NOTES

This command can't be used to set data_directory and any parameters (e.g., preset options) that are not allowed in postgresql.conf.

EXAMPLES

Set the wal_level:

    ALTER SYSTEM SET wal_level = hot_standby;

Set the authentication_timeout:

    ALTER SYSTEM SET authentication_timeout = 10;

COMPATIBILITY

The ALTER SYSTEM statement is a PostgreSQL extension.

SEE ALSO
SET(7), SHOW(7)