Thread: pgsql: pg_ctl: Add idempotent option

pgsql: pg_ctl: Add idempotent option

From
Peter Eisentraut
Date:
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/87306184580c9c49717b00d48a2f9e717f21e0a8

Modified Files
--------------
contrib/start-scripts/linux      |    6 +++---
doc/src/sgml/ref/pg_ctl-ref.sgml |   21 +++++++++++++++++++++
src/bin/pg_ctl/pg_ctl.c          |   29 ++++++++++++++++++++++-------
3 files changed, 46 insertions(+), 10 deletions(-)