diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2013-04-13 23:42:42 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2013-04-13 23:42:42 -0400 |
commit | 87306184580c9c49717b00d48a2f9e717f21e0a8 (patch) | |
tree | d39be0371ff7830870b353bda08a881b3cfe2802 /doc/src | |
parent | ba66752d278818b6b8797aec2e36cccf727db055 (diff) | |
download | postgresql-87306184580c9c49717b00d48a2f9e717f21e0a8.tar.gz postgresql-87306184580c9c49717b00d48a2f9e717f21e0a8.zip |
pg_ctl: Add idempotent option
This changes the behavior of the start and stop actions to exit
successfully if the server was already started or stopped.
This changes the default behavior of the start action: Before, if the
server was already running, it would print a message and succeed. Now,
that situation will result in an error. When running in idempotent
mode, no message is printed and pg_ctl exits successfully.
It was considered to just make the idempotent behavior the default and
only option, but pg_upgrade needs the old behavior.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pg_ctl-ref.sgml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml index 3107514901c..549730da6f9 100644 --- a/doc/src/sgml/ref/pg_ctl-ref.sgml +++ b/doc/src/sgml/ref/pg_ctl-ref.sgml @@ -39,6 +39,7 @@ 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> @@ -55,6 +56,7 @@ PostgreSQL documentation <arg choice="plain"><option>i[mmediate]</option></arg> </group> </arg> + <arg choice="opt"><option>-I</option></arg> </cmdsynopsis> <cmdsynopsis> @@ -271,6 +273,25 @@ PostgreSQL documentation </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> <listitem> |