1ALTER SYSTEM(7)          PostgreSQL 11.3 Documentation         ALTER SYSTEM(7)
2
3
4

NAME

6       ALTER_SYSTEM - change a server configuration parameter
7

SYNOPSIS

9       ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' | DEFAULT }
10
11       ALTER SYSTEM RESET configuration_parameter
12       ALTER SYSTEM RESET ALL
13

DESCRIPTION

15       ALTER SYSTEM is used for changing server configuration parameters
16       across the entire database cluster. It can be more convenient than the
17       traditional method of manually editing the postgresql.conf file.  ALTER
18       SYSTEM writes the given parameter setting to the postgresql.auto.conf
19       file, which is read in addition to postgresql.conf. Setting a parameter
20       to DEFAULT, or using the RESET variant, removes that configuration
21       entry from the postgresql.auto.conf file. Use RESET ALL to remove all
22       such configuration entries.
23
24       Values set with ALTER SYSTEM will be effective after the next server
25       configuration reload, or after the next server restart in the case of
26       parameters that can only be changed at server start. A server
27       configuration reload can be commanded by calling the SQL function
28       pg_reload_conf(), running pg_ctl reload, or sending a SIGHUP signal to
29       the main server process.
30
31       Only superusers can use ALTER SYSTEM. Also, since this command acts
32       directly on the file system and cannot be rolled back, it is not
33       allowed inside a transaction block or function.
34

PARAMETERS

36       configuration_parameter
37           Name of a settable configuration parameter. Available parameters
38           are documented in Chapter 19.
39
40       value
41           New value of the parameter. Values can be specified as string
42           constants, identifiers, numbers, or comma-separated lists of these,
43           as appropriate for the particular parameter.  DEFAULT can be
44           written to specify removing the parameter and its value from
45           postgresql.auto.conf.
46

NOTES

48       This command can't be used to set data_directory, nor parameters that
49       are not allowed in postgresql.conf (e.g., preset options).
50
51       See Section 19.1 for other ways to set the parameters.
52

EXAMPLES

54       Set the wal_level:
55
56           ALTER SYSTEM SET wal_level = replica;
57
58       Undo that, restoring whatever setting was effective in postgresql.conf:
59
60           ALTER SYSTEM RESET wal_level;
61

COMPATIBILITY

63       The ALTER SYSTEM statement is a PostgreSQL extension.
64

SEE ALSO

66       SET(7), SHOW(7)
67
68
69
70PostgreSQL 11.3                      2019                      ALTER SYSTEM(7)
Impressum