]> granicus.if.org Git - postgresql/blobdiff - doc/src/sgml/ref/pg_ctl-ref.sgml
Add option to pg_ctl to choose event source for logging
[postgresql] / doc / src / sgml / ref / pg_ctl-ref.sgml
index 549730da6f9edd5aefb67973c5925aa1725d1cb9..23681294b87d767f5d085936ac482bec743c26d5 100644 (file)
@@ -4,6 +4,10 @@ PostgreSQL documentation
 -->
 
 <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>
@@ -15,10 +19,6 @@ PostgreSQL documentation
   <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>
@@ -39,7 +39,6 @@ PostgreSQL documentation
    <arg choice="opt"><option>-o</option> <replaceable>options</replaceable></arg>
    <arg choice="opt"><option>-p</option> <replaceable>path</replaceable></arg>
    <arg choice="opt"><option>-c</option></arg>
-   <arg choice="opt"><option>-I</option></arg>
   </cmdsynopsis>
 
   <cmdsynopsis>
@@ -56,7 +55,6 @@ PostgreSQL documentation
        <arg choice="plain"><option>i[mmediate]</option></arg>
      </group>
    </arg>
-   <arg choice="opt"><option>-I</option></arg>
   </cmdsynopsis>
 
   <cmdsynopsis>
@@ -210,7 +208,8 @@ PostgreSQL documentation
    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>
@@ -272,25 +271,6 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>
 
-     <varlistentry>
-      <term><option>-I</option></term>
-      <term><option>--idempotent</option></term>
-      <listitem>
-       <para>
-        When used with the <literal>start</literal> or <literal>stop</literal>
-        actions, return exit code 0 if the server is already running or
-        stopped, respectively.  Otherwise, an error is raised and a nonzero
-        exit code is returned in these cases.
-       </para>
-
-       <para>
-        This option is useful for System-V-style init scripts, which require
-        the <literal>start</literal> and <literal>stop</literal> actions to be
-        idempotent.
-       </para>
-      </listitem>
-     </varlistentry>
-
      <varlistentry>
       <term><option>-l <replaceable class="parameter">filename</replaceable></option></term>
       <term><option>--log <replaceable class="parameter">filename</replaceable></option></term>
@@ -439,6 +419,22 @@ PostgreSQL documentation
    <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>