Re: pg_ctl promote wait
От | Peter Eisentraut |
---|---|
Тема | Re: pg_ctl promote wait |
Дата | |
Msg-id | 56C76394.1040604@gmx.net обсуждение исходный текст |
Ответ на | Re: pg_ctl promote wait (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: pg_ctl promote wait
Re: pg_ctl promote wait |
Список | pgsql-hackers |
On 2/18/16 3:33 AM, Andres Freund 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. >> >> How could pg_ctl determine when the promotion has finished? > > How about looking into pg_control? ControlFileData->state ought to have > the correct information. Is it safe to read pg_control externally without a lock? pg_controldata will just report a CRC error and proceed, and if you're not sure you can just run it again. But if a promotion fails every so often because of concurrent pg_control writes, that would make this feature annoying.
В списке pgsql-hackers по дате отправления: