2 .\" Title: ALTER SYSTEM
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "ALTER SYSTEM" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 ALTER_SYSTEM \- change a server configuration parameter
35 ALTER SYSTEM SET \fIconfiguration_parameter\fR { TO | = } { \fIvalue\fR [, \&.\&.\&.] | DEFAULT }
37 ALTER SYSTEM RESET \fIconfiguration_parameter\fR
38 ALTER SYSTEM RESET ALL
43 is used for changing server configuration parameters across the entire database cluster\&. It can be more convenient than the traditional method of manually editing the
47 writes the given parameter setting to the
48 postgresql\&.auto\&.conf
49 file, which is read in addition to
50 postgresql\&.conf\&. Setting a parameter to
53 variant, removes that configuration entry from the
54 postgresql\&.auto\&.conf
57 to remove all such configuration entries\&.
61 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\&. A server configuration reload can be commanded by calling the SQL function
62 \fBpg_reload_conf()\fR, running
63 pg_ctl reload, or sending a
65 signal to the main server process\&.
67 Only superusers and users granted
69 privilege on a parameter can change it using
70 \fBALTER SYSTEM\fR\&. Also, since this command acts directly on the file system and cannot be rolled back, it is not allowed inside a transaction block or function\&.
73 \fIconfiguration_parameter\fR
75 Name of a settable configuration parameter\&. Available parameters are documented in
81 New value of the parameter\&. Values can be specified as string constants, identifiers, numbers, or comma\-separated lists of these, as appropriate for the particular parameter\&. Values that are neither numbers nor valid identifiers must be quoted\&.
83 can be written to specify removing the parameter and its value from
84 postgresql\&.auto\&.conf\&.
86 For some list\-accepting parameters, quoted values will produce double\-quoted output to preserve whitespace and commas; for others, double\-quotes must be used inside single\-quoted strings to get this effect\&.
90 This command can\*(Aqt be used to set
92 allow_alter_system, nor parameters that are not allowed in
99 for other ways to set the parameters\&.
102 can be disabled by setting
105 off, but this is not a security mechanism (as explained in detail in the documentation for this parameter)\&.
115 ALTER SYSTEM SET wal_level = replica;
121 Undo that, restoring whatever setting was effective in
128 ALTER SYSTEM RESET wal_level;
141 \fBSET\fR(7), \fBSHOW\fR(7)