From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: In immediate shutdown, postmaster should not exit till children |
Date: | 2015-06-19 18:24:12 |
Message-ID: | E1Z60xY-0006UY-IE@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
In immediate shutdown, postmaster should not exit till children are gone.
This adjusts commit 82233ce7ea42d6ba519aaec63008aff49da6c7af so that the
postmaster does not exit until all its child processes have exited, even
if the 5-second timeout elapses and we have to send SIGKILL. There is no
great value in having the postmaster process quit sooner, and doing so can
mislead onlookers into thinking that the cluster is fully terminated when
actually some child processes still survive.
This effect might explain recent test failures on buildfarm member hamster,
wherein we failed to restart a cluster just after shutting it down with
"pg_ctl stop -m immediate".
I also did a bit of code review/beautification, including fixing a faulty
use of the Max() macro on a volatile expression.
Back-patch to 9.4. In older branches, the postmaster never waited for
children to exit during immediate shutdowns, and changing that would be
too much of a behavioral change.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/29722d79b820c8f8e37517e0dbd0deb3995d4986
Modified Files
--------------
doc/src/sgml/runtime.sgml | 9 +++++----
src/backend/postmaster/postmaster.c | 27 ++++++++++++---------------
2 files changed, 17 insertions(+), 19 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-06-20 14:47:06 | pgsql: Fix thinko in comment (launcher -> worker) |
Previous Message | Alvaro Herrera | 2015-06-19 15:59:46 | pgsql: Clamp autovacuum launcher sleep time to 5 minutes |