user.
This user does not actually have to exist, so the single-user mode
can be used to manually recover from certain
kinds of accidental damage to the system catalogs.
</para>
</refsect1>
<refsect1 id="app-postgres-options">
<title>Options</title>
<para>
<command>postgres</command> accepts the following command-line
arguments. For a detailed discussion of the options consult <xref
linkend="runtime-config"/>. You can save typing most of these
options by setting up a configuration file. Some (safe) options
can also be set from the connecting client in an
application-dependent way to apply only for that session. For
example, if the environment variable <envar>PGOPTIONS</envar> is
set, then <application>libpq</application>-based clients will pass that
string to the server, which will interpret it as
<command>postgres</command> command-line options.
</para>
<refsect2>
<title>General Purpose</title>
<variablelist>
<varlistentry>
<term><option>-B <replaceable class="parameter">nbuffers</replaceable></option></term>
<listitem>
<para>
Sets the number of shared buffers for use by the server
processes. The default value of this parameter is chosen
automatically by <application>initdb</application>.
Specifying this option is equivalent to setting the
<xref linkend="guc-shared-buffers"/> configuration parameter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
<listitem>
<para>
Sets a named run-time parameter. The configuration parameters
supported by <productname>PostgreSQL</productname> are
described in <xref linkend="runtime-config"/>. Most of the
other command line options are in fact short forms of such a
parameter assignment. <option>-c</option> can appear multiple times
to set multiple parameters.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-C <replaceable>name</replaceable></option></term>
<listitem>
<para>
Prints the value of the named run-time parameter, and exits.
(See the <option>-c</option> option above for details.) This
returns values from
<filename>postgresql.conf</filename>, modified by any parameters
supplied in this invocation. It does not reflect parameters
supplied when the cluster was started.
</para>
<para>
This can be used on a running server for most parameters. However,
the server must be shut down for some runtime-computed parameters
(e.g., <xref linkend="guc-shared-memory-size"/>,
<xref linkend="guc-shared-memory-size-in-huge-pages"/>, and
<xref linkend="guc-wal-segment-size"/>).
</para>
<para>
This option is meant for other programs that interact with a server
instance, such as <xref linkend="app-pg-ctl"/>, to query configuration
parameter values. User-facing applications should instead use <link
linkend="sql-show"><command>SHOW</command></link> or the <structname>pg_settings</structname> view.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d <replaceable>debug-level</replaceable></option></term>
<listitem>
<para>
Sets the debug level. The higher this value is set, the more
debugging output is written to the server log. Values are
from 1 to 5. It is also possible to pass <literal>-d
0</literal> for a specific session, which will prevent the
server log level of the parent <command>postgres</command> process from being
propagated to this session.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-D <replaceable class="parameter">datadir</replaceable></option></term>