Re: pg_rewind vs superuser

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_rewind vs superuser
Дата
Msg-id 20190405110529.GB1491@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_rewind vs superuser  (Michael Banck <mbanck@gmx.net>)
Ответы Re: pg_rewind vs superuser  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Fri, Apr 05, 2019 at 10:39:26AM +0200, Michael Banck wrote:
> Ok, so the problem is that that checkpoint might be still ongoing when
> you quickly issue a pg_rewind from the other side?

The end-of-recovery checkpoint may not have even begun.

> I think it might be useful to specify more exactly which of the two
> servers (the remote one AIUI) needs a CHECKPOINT in the above. Also, if
> it is the case that a CHECKPOINT is done automatically (see above), that
> paragraph could be rewritten to say something like "pg_rewind needs to
> wait for the checkoint on the remote server to finish. This can be
> ensured by issueing an explicit checkpoint on the remote server prior to
> running pg_rewind."

Well, the target server needs to be cleanly shut down, so it seems
pretty clear to me which one needs to have a checkpoint :)

> Finally, (and still, if I got the above correctly), to the suggestion of
> Magnus of pg_rewind running the checkpoint itself on the remote: would
> that again mean that pg_rewind needs SUPERUSER rights or is there
> a(nother) GRANTable function that could be added to the list in this
> case?

pg_rewind would require again a superuser.  So this could be
optional.  In one HA workflow I maintain, what I actually do is to
enforce directly a checkpoint immediately after the promotion is done
to make sure that the data is up-to-date, and I don't meddle with
pg_rewind workflow.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_rewind vs superuser
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: log bind parameter values on error