Re: pg_ctl promote wait

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pg_ctl promote wait
Дата
Msg-id CAHGQGwFoUz3hmRPn2wBCAvKwkdD3DQyeFkcg_HQBhk_bgzr16Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_ctl promote wait  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: pg_ctl promote wait  (Peter Eisentraut <peter_e@gmx.net>)
Re: pg_ctl promote wait  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, Feb 18, 2016 at 5:45 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 18 February 2016 at 08:33, Andres Freund <andres@anarazel.de> wrote:
>>
>> Hi,
>>
>> On 2016-02-17 21:47:50 -0500, Peter Eisentraut wrote:
>> > It would be nice if pg_ctl promote supported the -w (wait) option.

+1

>> > How could pg_ctl determine when the promotion has finished?
>>
>> How about looking into pg_control? ControlFileData->state ought to have
>> the correct information.
>
>
> +1

One concern is that there can be a "time" after the pg_control's state
is changed to DB_IN_PRODUCTION and before the server is able to
start accepting normal (not read-only) connections. So if users try to
start write transaction just after pg_ctl promote -w ends, they might
get an error because the server is still in recovery, i.e., the startup
process is running.

Regards,

-- 
Fujii Masao



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: checkpointer continuous flushing - V16
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL Audit Extension