-->
<refentry id="app-pg-ctl">
+ <indexterm zone="app-pg-ctl">
+ <primary>pg_ctl</primary>
+ </indexterm>
+
<refmeta>
<refentrytitle><application>pg_ctl</application></refentrytitle>
<manvolnum>1</manvolnum>
<refpurpose>initialize, start, stop, or control a <productname>PostgreSQL</productname> server</refpurpose>
</refnamediv>
- <indexterm zone="app-pg-ctl">
- <primary>pg_ctl</primary>
- </indexterm>
-
<refsynopsisdiv>
<cmdsynopsis>
<command>pg_ctl</command>
<para>
<option>restart</option> mode effectively executes a stop followed
by a start. This allows changing the <command>postgres</command>
- command-line options.
+ command-line options. <option>restart</option> might fail if
+ relative paths specified were specified on the command-line during
+ server start.
</para>
<para>
the specified data directory. If it is, the <acronym>PID</acronym>
and the command line options that were used to invoke it are
displayed. If the server is not running, the process returns an
- exit status of 3.
+ exit status of 3. If an accessible data directory is not specified,
+ the process returns an exit status of 4.
</para>
<para>
<term><option>--pgdata <replaceable class="parameter">datadir</replaceable></option></term>
<listitem>
<para>
- Specifies the file system location of the database files. If
+ Specifies the file system location of the database configuration files. If
this is omitted, the environment variable
<envar>PGDATA</envar> is used.
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_ctl</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-w</option></term>
<listitem>
attempts to connect to the server.
When waiting for shutdown, <command>pg_ctl</command> waits for
the server to remove its <acronym>PID</acronym> file.
+ This option allows the entry of an <acronym>SSL</> passphrase on startup.
<command>pg_ctl</command> returns an exit code based on the
success of the startup or shutdown.
</para>
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_ctl</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<refsect2 id="app-pg-ctl-windows-options">
<title>Options for Windows</title>
<variablelist>
+ <varlistentry>
+ <term><option>-e <replaceable class="parameter">source</replaceable></option></term>
+ <listitem>
+ <para>
+ Name of the event source for <application>pg_ctl</application> to use
+ for logging to the event log when running as a Windows service. The
+ default is <literal>PostgreSQL</literal>. Note that this only controls
+ the logging from <application>pg_ctl</application> itself - once
+ started, the server will use the event source specified
+ by <xref linkend="guc-event-source">. Should the server fail during
+ early startup, it may also log using the default event
+ source <literal>PostgreSQL</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-N <replaceable class="parameter">servicename</replaceable></option></term>
<listitem>