Re: pg_rewind WAL segments deletion pitfall

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: pg_rewind WAL segments deletion pitfall
Дата
Msg-id 20220830.165131.1873011317661150194.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: pg_rewind WAL segments deletion pitfall  (Alexander Kukushkin <cyberdemn@gmail.com>)
Ответы Re: pg_rewind WAL segments deletion pitfall  (Alexander Kukushkin <cyberdemn@gmail.com>)
Список pgsql-hackers
At Tue, 30 Aug 2022 08:49:27 +0200, Alexander Kukushkin <cyberdemn@gmail.com> wrote in 
> No, we are complaining exactly about WAL segments from the old timeline
> that are removed by pg_rewind.
> Those segments haven't been archived by the old primary and the new primary
> already recycled them.

Yeah, sorry for my thick skull but I finally got your point.

And as I said in a mail I sent just before, the patch looks too
complex.  How about just comparing WAL file name aginst the last
common checkpoint's tli and lsn? We can tell filemap.c about the last
checkpoint and decide_file_action can compare the file name with it.

It is sufficient to preserve WAL files if tli matches and the segment
number of the WAL file is equal to or later than the checkpoint
location.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Benoit Lobréau
Дата:
Сообщение: Re: archive modules
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Fix japanese translation of log messages