Re: Revised patch for fixing archiver shutdown behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Revised patch for fixing archiver shutdown behavior
Дата
Msg-id 6075.1199980168@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Revised patch for fixing archiver shutdown behavior  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Revised patch for fixing archiver shutdown behavior  (Simon Riggs <simon@2ndquadrant.com>)
Re: Revised patch for fixing archiver shutdown behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> Maybe we should go back to the plan of having the postmaster
>> wait for the archiver to exit.

> Yeah, that seems the safest to me -- the problem is that it complicates
> the shutdown sequence a fair bit, because postmaster must act
> differently depending on whether archiving is enabled or not: wait for
> bgwriter exit if disabled, or for archiver exit otherwise.

Given the recent changes to make the postmaster act as a state machine,
I don't think this is really a big deal --- it's just one more state.
The bigger part is that the archiver can't wait for postmaster exit.
We'll need a proper shutdown signal for the archiver, but since it's
not using SIGUSR2 that can be commandeered easily.  So it'd be like

    SIGUSR1 -> do an archive cycle
    SIGUSR2 -> do an archive cycle and exit
    no postmaster -> just exit

The rationale for the last is that it's a crash situation, and
furthermore there's a risk of someone starting a new postmaster
and a conflicting archiver.  So we should put back the behavior
my last patch removed of aborting archiving immediately on
postmaster death.

I'll respin my patch this way...

            regards, tom lane

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

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: reference problem of manifest.(win32.mak of libpq.dll)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Revised patch for fixing archiver shutdown behavior