pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: In immediate shutdown, postmaster should not exit till children
2+ messages / 1 participants
[nested] [flat]

* pgsql: In immediate shutdown, postmaster should not exit till children
@ 2015-06-19 18:24  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-06-19 18:24 UTC (permalink / raw)
  To: 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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: In immediate shutdown, postmaster should not exit till children
@ 2015-06-19 18:24  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-06-19 18:24 UTC (permalink / raw)
  To: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/48913db887e6a41fa3f1b6cdf80ee89e38f21d9d

Modified Files
--------------
doc/src/sgml/runtime.sgml           |    9 +++++----
src/backend/postmaster/postmaster.c |   27 ++++++++++++---------------
2 files changed, 17 insertions(+), 19 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-06-19 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 18:24 pgsql: In immediate shutdown, postmaster should not exit till children Tom Lane <tgl@sss.pgh.pa.us>
2015-06-19 18:24 pgsql: In immediate shutdown, postmaster should not exit till children Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox