Re: BUG #13368: standby cluster immediately promotes after pg_basebackup from previously promoted master

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #13368: standby cluster immediately promotes after pg_basebackup from previously promoted master
Дата
Msg-id CAB7nPqSrL88T0ep6mHK-fNiQY26rW3Hj1-4A6LLnaoNQc=-JkQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13368: standby cluster immediately promotes after pg_basebackup from previously promoted master  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: BUG #13368: standby cluster immediately promotes after pg_basebackup from previously promoted master  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-bugs
On Thu, Jul 2, 2015 at 10:00 PM, Fujii Masao wrote:
>> At the beginning of
>> StartupXLOG() before parsing recovery.conf we could check for the
>> existence of promotion trigger files and unlink them unconditionally.
>
> There seems to be still race condition: postmaster can receive SIGUSR1
> before the startup process removes the promotion trigger file. Then
> the variable promote_triggered can be set to true unexpectedly.

Ah, yes. That's indeed possible.

> So, what about making postmaster remove the trigger file unconditionally
> before the startup process is forked, instead? For example, just after
> PostmasterMain() calls RemovePgTempFiles()?

Sounds fine, no other processes are running at this point.
--
Michael

Вложения

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

Предыдущее
От: mailrsatish@gmail.com
Дата:
Сообщение: BUG #13482: Unable SET DATA TYPE geometry(MultiPolygon) with other geometry type
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: BUG #13368: standby cluster immediately promotes after pg_basebackup from previously promoted master