'\" t .\" Title: ALTER SYSTEM .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 2016 .\" Manual: PostgreSQL 9.5.2 Documentation .\" Source: PostgreSQL 9.5.2 .\" Language: English .\" .TH "ALTER SYSTEM" "5sql" "2016" "PostgreSQL 9.5.2" "PostgreSQL 9.5.2 Documentation" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ALTER_SYSTEM \- change a server configuration parameter .SH "SYNOPSIS" .sp .nf ALTER SYSTEM SET \fIconfiguration_parameter\fR { TO | = } { \fIvalue\fR | \(aq\fIvalue\fR\(aq | DEFAULT } ALTER SYSTEM RESET \fIconfiguration_parameter\fR ALTER SYSTEM RESET ALL .fi .SH "DESCRIPTION" .PP \fBALTER SYSTEM\fR 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 postgresql\&.conf file\&. \fBALTER SYSTEM\fR writes the given parameter setting to the postgresql\&.auto\&.conf file, which is read in addition to postgresql\&.conf\&. Setting a parameter to DEFAULT, or using the \fBRESET\fR variant, removes that configuration entry from the postgresql\&.auto\&.conf file\&. Use RESET ALL to remove all such configuration entries\&. .PP Values set with \fBALTER SYSTEM\fR will be effective after the next server configuration reload (SIGHUP or pg_ctl reload), or after the next server restart in the case of parameters that can only be changed at server start\&. .PP Only superusers can use \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\&. .SH "PARAMETERS" .PP \fIconfiguration_parameter\fR .RS 4 Name of a settable configuration parameter\&. Available parameters are documented in Chapter 18, Server Configuration, in the documentation\&. .RE .PP \fIvalue\fR .RS 4 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\&. DEFAULT can be written to specify removing the parameter and its value from postgresql\&.auto\&.conf\&. .RE .SH "NOTES" .PP This command can\(aqt be used to set data_directory, nor parameters that are not allowed in postgresql\&.conf (e\&.g\&., preset options)\&. .PP See Section 18.1, \(lqSetting Parameters\(rq, in the documentation for other ways to set the parameters\&. .SH "EXAMPLES" .PP Set the wal_level: .sp .if n \{\ .RS 4 .\} .nf ALTER SYSTEM SET wal_level = hot_standby; .fi .if n \{\ .RE .\} .PP Undo that, restoring whatever setting was effective in postgresql\&.conf: .sp .if n \{\ .RS 4 .\} .nf ALTER SYSTEM RESET wal_level; .fi .if n \{\ .RE .\} .sp .SH "COMPATIBILITY" .PP The \fBALTER SYSTEM\fR statement is a PostgreSQL extension\&. .SH "SEE ALSO" \fBSET\fR(5), \fBSHOW\fR(5)