pgsql: Avoid calling kill() in a postmaster signal handler.

Поиск
Список
Период
Сортировка
От alvherre@postgresql.org (Alvaro Herrera)
Тема pgsql: Avoid calling kill() in a postmaster signal handler.
Дата
Msg-id 20090824172329.2065375331E@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Avoid calling kill() in a postmaster signal handler.

This causes problems when the system load is high, per report from Zdenek
Kotala in <1250860954.1239.114.camel@localhost>; instead of calling kill
directly, have the signal handler set a flag which is checked in ServerLoop.
This way, the handler can return before being called again by a subsequent
signal sent from the autovacuum launcher.  Also, increase the sleep in the
launcher in this failure path to 1 second.

Backpatch to 8.3, which is when the signalling between autovacuum
launcher/postmaster was introduced.

Also, add a couple of ReleasePostmasterChildSlot calls in error paths; this
part backpatched to 8.4 which is when the child slot stuff was introduced.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        autovacuum.c (r1.71.2.9 -> r1.71.2.10)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c?r1=1.71.2.9&r2=1.71.2.10)
        postmaster.c (r1.551.2.3 -> r1.551.2.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.551.2.3&r2=1.551.2.4)

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

Предыдущее
От: alvherre@postgresql.org (Alvaro Herrera)
Дата:
Сообщение: pgsql: Avoid calling kill() in a postmaster signal handler.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Small correction to previous patch: we shouldn't