Skip to content

Commit 45aaaa4

Browse files
committed
Doc: improve documentation about postgresql.auto.conf.
Clarify what external tools can do to this file, and add a bit of detail about what ALTER SYSTEM itself does. Discussion: https://postgr.es/m/aed6cc9f-98f3-2693-ac81-52bb0052307e@2ndquadrant.com
1 parent f1bf619 commit 45aaaa4

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

doc/src/sgml/config.sgml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ shared_buffers = 128MB
153153
identifiers or numbers must be single-quoted. To embed a single
154154
quote in a parameter value, write either two quotes (preferred)
155155
or backslash-quote.
156+
If the file contains multiple entries for the same parameter,
157+
all but the last one are ignored.
156158
</para>
157159

158160
<para>
@@ -185,18 +187,29 @@ shared_buffers = 128MB
185187
In addition to <filename>postgresql.conf</filename>,
186188
a <productname>PostgreSQL</productname> data directory contains a file
187189
<filename>postgresql.auto.conf</filename><indexterm><primary>postgresql.auto.conf</primary></indexterm>,
188-
which has the same format as <filename>postgresql.conf</filename> but should
189-
never be edited manually. This file holds settings provided through
190-
the <xref linkend="sql-altersystem"/> command. This file is automatically
191-
read whenever <filename>postgresql.conf</filename> is, and its settings take
192-
effect in the same way. Settings in <filename>postgresql.auto.conf</filename>
193-
override those in <filename>postgresql.conf</filename>.
190+
which has the same format as <filename>postgresql.conf</filename> but
191+
is intended to be edited automatically not manually. This file holds
192+
settings provided through the <xref linkend="sql-altersystem"/> command.
193+
This file is read whenever <filename>postgresql.conf</filename> is,
194+
and its settings take effect in the same way. Settings
195+
in <filename>postgresql.auto.conf</filename> override those
196+
in <filename>postgresql.conf</filename>.
197+
</para>
198+
199+
<para>
200+
External tools may also
201+
modify <filename>postgresql.auto.conf</filename>. It is not
202+
recommended to do this while the server is running, since a
203+
concurrent <command>ALTER SYSTEM</command> command could overwrite
204+
such changes. Such tools might simply append new settings to the end,
205+
or they might choose to remove duplicate settings and/or comments
206+
(as <command>ALTER SYSTEM</command> will).
194207
</para>
195208

196209
<para>
197210
The system view
198211
<link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link>
199-
can be helpful for pre-testing changes to the configuration file, or for
212+
can be helpful for pre-testing changes to the configuration files, or for
200213
diagnosing problems if a <systemitem>SIGHUP</systemitem> signal did not have the
201214
desired effects.
202215
</para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy