Re: pg_rewind: warn when checkpoint hasn't happened after promotion

Поиск
Список
Период
Сортировка
От James Coleman
Тема Re: pg_rewind: warn when checkpoint hasn't happened after promotion
Дата
Msg-id CAAaqYe9L_c1Z6qsXGXSQ7_d=U3HA1N0uJGLz_MW40zZwvB-FtA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_rewind: warn when checkpoint hasn't happened after promotion  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_rewind: warn when checkpoint hasn't happened after promotion  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Tue, Jul 5, 2022 at 2:39 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Sat, Jun 4, 2022 at 8:59 AM James Coleman <jtc331@gmail.com> wrote:
> > A quick background refresher: after promoting a standby rewinding the
> > former primary requires that a checkpoint have been completed on the
> > new primary after promotion. This is correctly documented. However
> > pg_rewind incorrectly reports to the user that a rewind isn't
> > necessary because the source and target are on the same timeline.
>
> Is there anything intrinsic to the mechanism of operation of pg_rewind
> that requires a timeline change, or could we just rewind within the
> same timeline to an earlier LSN? In other words, maybe we could just
> remove this limitation of pg_rewind, and then perhaps it wouldn't be
> necessary to determine what the new timeline is.

I think (someone can correct me if I'm wrong) that in theory the
mechanisms would support the source and target being on the same
timeline, but in practice that presents problems since you'd not have
an LSN you could detect as the divergence point. If we allowed passing
"rewind to" point LSN value, then that (again, as far as I understand
it) would work, but it's a different use case. Specifically I wouldn't
want that option to need to be used for this particular case since in
my example there is in fact a real divergence point that we should be
detecting automatically.

Thanks,
James Coleman



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Emit extra debug message when executing extension script.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_rewind: warn when checkpoint hasn't happened after promotion