Re: Clean shutdown and warm standby

Поиск
Список
Период
Сортировка
От Guillaume Smet
Тема Re: Clean shutdown and warm standby
Дата
Msg-id 1d4e0c10904090236k43339cbcldb13889507abef79@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Clean shutdown and warm standby  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Clean shutdown and warm standby  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Thu, Apr 9, 2009 at 5:00 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> RequestXLogSwitch() doesn't wait until the switched WAL file has
> actually been archived. So, some WAL files still may not exist in
> the standby server also after clean shutdown of the primary.

Thanks for your comment.

RequestXLogSwitch() doesn't wait for archiving but the shutdown
process takes care of it AFAICS.

As far as I understand the shutdown code, we have the following
sequence (I just explain here the steps involved in the XLog and
archiver shutdown):
- postmaster.c line 2693: PM_WAIT_BACKENDS state: we start the
bgwriter and shut it down. It calls ShutdownXLog which creates the
shutdown checkpoint and, with my patch, switch to a new XLog file.
Then we are in PM_SHUTDOWN state.
- postmaster.c line 2244: the reaper is called for the bgwriter child
just shutdown and  wakens the archiver one last time: the archive
command is executed for our last XLog file.

Did I miss something?

-- 
Guillaume


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Clean shutdown and warm standby
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Clean shutdown and warm standby