pgsql: In immediate shutdown, postmaster should not exit till children

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: In immediate shutdown, postmaster should not exit till children
Дата
Msg-id E1Z60xY-0006UX-I9@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Clamp autovacuum launcher sleep time to 5 minutes
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix thinko in comment (launcher -> worker)