identifiers or numbers must be single-quoted. To embed a single
quote in a parameter value, write either two quotes (preferred)
or backslash-quote.
If the file contains multiple entries for the same parameter,
all but the last one are ignored.
</para>
<para>
Parameters set in this way provide default values for the cluster.
The settings seen by active sessions will be these values unless they
are overridden. The following sections describe ways in which the
administrator or user can override these defaults.
</para>
<para>
<indexterm>
<primary>SIGHUP</primary>
</indexterm>
The configuration file is reread whenever the main server process
receives a <systemitem>SIGHUP</systemitem> signal; this signal is most easily
sent by running <literal>pg_ctl reload</literal> from the command line or by
calling the SQL function <function>pg_reload_conf()</function>. The main
server process also propagates this signal to all currently running
server processes, so that existing sessions also adopt the new values
(this will happen after they complete any currently-executing client
command). Alternatively, you can
send the signal to a single server process directly. Some parameters
can only be set at server start; any changes to their entries in the
configuration file will be ignored until the server is restarted.
Invalid parameter settings in the configuration file are likewise
ignored (but logged) during <systemitem>SIGHUP</systemitem> processing.
</para>
<para>
In addition to <filename>postgresql.conf</filename>,
a <productname>PostgreSQL</productname> data directory contains a file
<filename>postgresql.auto.conf</filename><indexterm><primary>postgresql.auto.conf</primary></indexterm>,
which has the same format as <filename>postgresql.conf</filename> but
is intended to be edited automatically, not manually. This file holds
settings provided through the <link linkend="sql-altersystem"><command>ALTER SYSTEM</command></link> command.
This file is read whenever <filename>postgresql.conf</filename> is,
and its settings take effect in the same way. Settings
in <filename>postgresql.auto.conf</filename> override those
in <filename>postgresql.conf</filename>.
</para>
<para>
External tools may also
modify <filename>postgresql.auto.conf</filename>. It is not
recommended to do this while the server is running unless <xref
linkend="guc-allow-alter-system"/> is set to <literal>off</literal>, since a
concurrent <command>ALTER SYSTEM</command> command could overwrite
such changes. Such tools might simply append new settings to the end,
or they might choose to remove duplicate settings and/or comments
(as <command>ALTER SYSTEM</command> will).
</para>
<para>
The system view
<link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link>
can be helpful for pre-testing changes to the configuration files, or for
diagnosing problems if a <systemitem>SIGHUP</systemitem> signal did not have the
desired effects.
</para>
</sect2>
<sect2 id="config-setting-sql">
<title>Parameter Interaction via SQL</title>
<para>
<productname>PostgreSQL</productname> provides three SQL
commands to establish configuration defaults.
The already-mentioned <command>ALTER SYSTEM</command> command
provides an SQL-accessible means of changing global defaults; it is
functionally equivalent to editing <filename>postgresql.conf</filename>.
In addition, there are two commands that allow setting of defaults
on a per-database or per-role basis:
</para>
<itemizedlist>
<listitem>
<para>
The <link linkend="sql-alterdatabase"><command>ALTER DATABASE</command></link> command allows global
settings to