Commit af06aa82 authored by Tom Lane's avatar Tom Lane

Improve documentation around parameter-setting and ALTER SYSTEM.

The ALTER SYSTEM ref page hadn't been held to a very high standard, nor
was the feature well integrated into section 18.1 (parameter setting).
Also, though commit 4c4654af had improved the structure of 18.1, it also
introduced a lot of poor wording, imprecision, and outright falsehoods.
Try to clean that up.
parent 0923b01e
This diff is collapsed.
...@@ -32,23 +32,30 @@ ALTER SYSTEM RESET ALL ...@@ -32,23 +32,30 @@ ALTER SYSTEM RESET ALL
<title>Description</title> <title>Description</title>
<para> <para>
<command>ALTER SYSTEM</command> writes the configuration parameter <command>ALTER SYSTEM</command> is used for changing server configuration
values to the <filename>postgresql.auto.conf</filename> file. parameters across the entire database cluster. It can be more convenient
Setting the parameter to <literal>DEFAULT</literal>, or using the than the traditional method of manually editing
<command>RESET</command> variant, removes the configuration entry from the <filename>postgresql.conf</filename> file.
<command>ALTER SYSTEM</command> writes the given parameter setting to
the <filename>postgresql.auto.conf</filename> file, which is read in
addition to <filename>postgresql.conf</filename>.
Setting a parameter to <literal>DEFAULT</literal>, or using the
<command>RESET</command> variant, removes that configuration entry from the
<filename>postgresql.auto.conf</filename> file. Use <literal>RESET <filename>postgresql.auto.conf</filename> file. Use <literal>RESET
ALL</literal> to clear all configuration entries. The values will ALL</literal> to remove all such configuration entries.
be effective after reload of server configuration (SIGHUP) or in next
server start based on the type of configuration parameter modified.
</para> </para>
<para> <para>
This command is not allowed inside transaction block or function. Values set with <command>ALTER SYSTEM</command> will be effective after
the next server configuration reload (<systemitem>SIGHUP</>
or <literal>pg_ctl reload</>), or after the next server restart in the
case of parameters that can only be changed at server start.
</para> </para>
<para> <para>
See <xref linkend="config-setting"> for other ways to set the parameters and Only superusers can use <command>ALTER SYSTEM</command>. Also, since
how they become effective. this command acts directly on the file system and cannot be rolled back,
it is not allowed inside a transaction block or function.
</para> </para>
</refsect1> </refsect1>
...@@ -60,7 +67,7 @@ ALTER SYSTEM RESET ALL ...@@ -60,7 +67,7 @@ ALTER SYSTEM RESET ALL
<term><replaceable class="parameter">configuration_parameter</replaceable></term> <term><replaceable class="parameter">configuration_parameter</replaceable></term>
<listitem> <listitem>
<para> <para>
Name of a settable run-time parameter. Available parameters are Name of a settable configuration parameter. Available parameters are
documented in <xref linkend="runtime-config">. documented in <xref linkend="runtime-config">.
</para> </para>
</listitem> </listitem>
...@@ -70,11 +77,11 @@ ALTER SYSTEM RESET ALL ...@@ -70,11 +77,11 @@ ALTER SYSTEM RESET ALL
<term><replaceable class="parameter">value</replaceable></term> <term><replaceable class="parameter">value</replaceable></term>
<listitem> <listitem>
<para> <para>
New value of parameter. Values can be specified as string New value of the parameter. Values can be specified as string
constants, identifiers, numbers, or comma-separated lists of constants, identifiers, numbers, or comma-separated lists of
these, as appropriate for the particular parameter. these, as appropriate for the particular parameter.
<literal>DEFAULT</literal> can be written to specify to remove the <literal>DEFAULT</literal> can be written to specify removing the
parameter and its value from <filename>postgresql.auto.conf</filename> parameter and its value from <filename>postgresql.auto.conf</filename>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -85,9 +92,13 @@ ALTER SYSTEM RESET ALL ...@@ -85,9 +92,13 @@ ALTER SYSTEM RESET ALL
<title>Notes</title> <title>Notes</title>
<para> <para>
This command can't be used to set <xref linkend="guc-data-directory"> This command can't be used to set <xref linkend="guc-data-directory">,
and any parameters (e.g., <link linkend="runtime-config-preset">preset options</>) nor parameters that are not allowed in <filename>postgresql.conf</>
that are not allowed in <filename>postgresql.conf</>. (e.g., <link linkend="runtime-config-preset">preset options</>).
</para>
<para>
See <xref linkend="config-setting"> for other ways to set the parameters.
</para> </para>
</refsect1> </refsect1>
...@@ -102,10 +113,12 @@ ALTER SYSTEM SET wal_level = hot_standby; ...@@ -102,10 +113,12 @@ ALTER SYSTEM SET wal_level = hot_standby;
</para> </para>
<para> <para>
Set the <literal>authentication_timeout</>: Undo that, restoring whatever setting was effective
in <filename>postgresql.conf</>:
<programlisting> <programlisting>
ALTER SYSTEM SET authentication_timeout = 10; ALTER SYSTEM RESET wal_level;
</programlisting></para> </programlisting>
</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment