We originally chose "smart" as the default pg_ctl shutdown method because it was the least disruptive, but experience has shown that it is too polite, so the current default is inconvenient.
We have discussed changing the default shutdown mode to "fast", and 9.5 might be the release where we do that. The attached patch accomplishes this. I have not re-ordered the shutdown method options because I am trying to keep the list logical, from least to most severe, so "smart" is still listed first. It is odd that the default is the middle option, but I don't see any other idea on improving that. How do we handle other cases where the default is in the middle of a range of values? -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml new file mode 100644 index 29f882b..2df65db *** a/doc/src/sgml/ref/pg_ctl-ref.sgml --- b/doc/src/sgml/ref/pg_ctl-ref.sgml *************** PostgreSQL documentation *** 173,183 **** In <option>stop</option> mode, the server that is running in the specified data directory is shut down. Three different shutdown methods can be selected with the <option>-m</option> ! option. <quote>Smart</quote> mode (the default) waits for all active clients to disconnect and any online backup to finish. If the server is in hot standby, recovery and streaming replication will be terminated once all clients have disconnected. ! <quote>Fast</quote> mode does not wait for clients to disconnect and will terminate an online backup in progress. All active transactions are rolled back and clients are forcibly disconnected, then the server is shut down. <quote>Immediate</quote> mode will abort --- 173,183 ---- In <option>stop</option> mode, the server that is running in the specified data directory is shut down. Three different shutdown methods can be selected with the <option>-m</option> ! option. <quote>Smart</quote> mode waits for all active clients to disconnect and any online backup to finish. If the server is in hot standby, recovery and streaming replication will be terminated once all clients have disconnected. ! <quote>Fast</quote> mode (the default) does not wait for clients to disconnect and will terminate an online backup in progress. All active transactions are rolled back and clients are forcibly disconnected, then the server is shut down. <quote>Immediate</quote> mode will abort *************** PostgreSQL documentation *** 292,298 **** Specifies the shutdown mode. <replaceable>mode</replaceable> can be <literal>smart</literal>, <literal>fast</literal>, or <literal>immediate</literal>, or the first letter of one of ! these three. If this is omitted, <literal>smart</literal> is used. </para> </listitem> </varlistentry> --- 292,298 ---- Specifies the shutdown mode. <replaceable>mode</replaceable> can be <literal>smart</literal>, <literal>fast</literal>, or <literal>immediate</literal>, or the first letter of one of ! these three. If this is omitted, <literal>fast</literal> is used. </para> </listitem> </varlistentry> diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c new file mode 100644 index 052caff..32423a5 *** a/src/bin/pg_ctl/pg_ctl.c --- b/src/bin/pg_ctl/pg_ctl.c *************** static bool do_wait = false; *** 79,85 **** static bool wait_set = false; static int wait_seconds = DEFAULT_WAIT; static bool silent_mode = false; ! static ShutdownMode shutdown_mode = SMART_MODE; static int sig = SIGTERM; /* default */ static CtlCommand ctl_command = NO_COMMAND; static char *pg_data = NULL; --- 79,85 ---- static bool wait_set = false; static int wait_seconds = DEFAULT_WAIT; static bool silent_mode = false; ! static ShutdownMode shutdown_mode = FAST_MODE; static int sig = SIGTERM; /* default */ static CtlCommand ctl_command = NO_COMMAND; static char *pg_data = NULL;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers