From 87306184580c9c49717b00d48a2f9e717f21e0a8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 13 Apr 2013 23:42:42 -0400 Subject: 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. --- doc/src/sgml/ref/pg_ctl-ref.sgml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc/src') 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 options path + @@ -55,6 +56,7 @@ PostgreSQL documentation + @@ -270,6 +272,25 @@ PostgreSQL documentation + + + + + + When used with the start or stop + 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. + + + + This option is useful for System-V-style init scripts, which require + the start and stop actions to be + idempotent. + + + + -- cgit v1.2.3