From ea0382e3706ab25935c733fd452d828832e4675f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 26 Apr 2008 22:47:40 +0000 Subject: Code review for recent patch to terminate online backup during shutdown: do CancelBackup at a sane place, fix some oversights in the state transitions, allow only superusers to connect while we are waiting for backup mode to end. --- doc/src/sgml/runtime.sgml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 5c36f9fce00..75c6d266e9d 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,4 +1,4 @@ - + Operating System Environment @@ -1306,12 +1306,15 @@ sysctl -w vm.overcommit_memory=2 SIGTERMSIGTERM + This is the Smart Shutdown mode. After receiving SIGTERM, the server - waits until online backup mode is no longer active. It then disallows new connections, but lets existing sessions end their - work normally. It shuts down only after all of the sessions - terminate normally. This is the Smart - Shutdown. + work normally. It shuts down only after all of the sessions terminate. + If the server is in online backup mode, it additionally waits + until online backup mode is no longer active. While backup mode is + active, new connections will still be allowed, but only to superusers + (this exception allows a superuser to connect to terminate + online backup mode). @@ -1320,13 +1323,13 @@ sysctl -w vm.overcommit_memory=2 SIGINTSIGINT + This is the Fast Shutdown mode. The server disallows new connections and sends all existing server processes SIGTERM, which will cause them to abort their current transactions and exit promptly. It then waits for the server processes to exit and finally shuts down. If the server is in online backup mode, backup mode will be - terminated, rendering the backup useless. This is the - Fast Shutdown. + terminated, rendering the backup useless. @@ -1335,8 +1338,8 @@ sysctl -w vm.overcommit_memory=2 SIGQUITSIGQUIT - This is the Immediate Shutdown, which - will cause the master postgres process to send a + This is the Immediate Shutdown mode. + The master postgres process will send a SIGQUIT to all child processes and exit immediately, without properly shutting itself down. The child processes likewise exit immediately upon receiving @@ -1377,8 +1380,8 @@ $ kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid` - To terminate a session while allowing other sessions to continue, use - pg_terminate_backend() (pg_terminate_backend() (see ) or send a SIGTERM signal to the child process associated with the session. -- cgit v1.2.3