Fast shutdown stop should forcibly disconnect any active backends, even

if a smart shutdown is already in progress. Backpatch to 8.3, this was broken
in the patch that introduced "dead-end backends".

Per report by Itagaki Takahiro, patch by Fujii Masao.
This commit is contained in:
Heikki Linnakangas 2009-08-07 06:00:09 +00:00
parent 4f9bb2766d
commit b1fc543b5d

View File

@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551.2.1 2008/06/27 01:53:31 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551.2.2 2009/08/07 06:00:09 heikki Exp $
* *
* NOTES * NOTES
* *
@ -1994,7 +1994,8 @@ pmdie(SIGNAL_ARGS)
if (StartupPID != 0) if (StartupPID != 0)
signal_child(StartupPID, SIGTERM); signal_child(StartupPID, SIGTERM);
if (pmState == PM_RUN) if (pmState == PM_RUN ||
pmState == PM_WAIT_BACKENDS)
{ {
ereport(LOG, ereport(LOG,
(errmsg("aborting any active transactions"))); (errmsg("aborting any active transactions")));