Re: pg_ctl promote wait

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: pg_ctl promote wait
Дата
Msg-id CANP8+j+F31J-rKULZ2rPPbNRfC5EpEqp_NseueoE6CMU_+sSXg@mail.gmail.com
обсуждение исходный текст
Ответ на pg_ctl promote wait  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 18 February 2016 at 02:47, Peter Eisentraut <peter_e@gmx.net> wrote:
It would be nice if pg_ctl promote supported the -w (wait) option.

How could pg_ctl determine when the promotion has finished?

We could query pg_is_in_recovery(), but that would require database
access, which we got rid of in pg_ctl.

We could check when recovery.conf is gone or recovery.done appears.
This could work, but I think some people are trying to get rid of these
files, so building a feature on that might be a problem?  (I think the
latest news on that was that the files might be different in this
hypothetical future but there would still be a file to prevent
re-recovery on restart.)

Other ideas?

We use a trigger file under the covers, so a promotion complete file seems useful also, but crappy.

Perhaps we should have a Server Status file that shows Standby or Master, obviously not updated on crash. 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: a raft of parallelism-related bug fixes
Следующее
От: Andres Freund
Дата:
Сообщение: Re: exposing pg_controldata and pg_config as functions