Re: Improve shutdown during online backup, take 4

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Improve shutdown during online backup, take 4
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C2020A7785@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Improve shutdown during online backup, take 4  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improve shutdown during online backup, take 4  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
>>> Why not?  It'll fall out of the state again immediately in
>>> PostmasterStateMachine, no, if we do a CancelBackup here?
>>
>> We cannot call CancelBackup there because that's exactly the state
>> in which a smart shutdown waits for a superuser to issue pg_stop_backup().
>
> Er, I was complaining about the fast-shutdown code path, not the
> smart-shutdown one.

Yes, I got that.
So you suggest that a fast shutdown *first* calls CancelBackup and
then goes into WAIT_BACKUP state, right?

That should work, but isn't it better if backup_label is removed
only if we know we're going to shutdown cleanly?

I think the patch in http://archives.postgresql.org/pgsql-patches/2008-04/msg00458.php
should meet your justified complaints, by calling CancelBackup immediately
before PostmasterExit(0) in PostmasterStateMachine.

Yours,
Laurenz Albe

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Sun Studio on Linux spinlock patch
Следующее
От: Hans-Juergen Schoenig
Дата:
Сообщение: Re: 64-bit CommandIds