Standby recovers records from wrong timeline

Поиск
Список
Период
Сортировка
От Ants Aasma
Тема Standby recovers records from wrong timeline
Дата
Msg-id CANwKhkMN3QwAcvuDZHb6wsvLRtkweBiYso-KLFykkQVWuQLcOw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Standby recovers records from wrong timeline  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
When standby is recovering to a timeline that doesn't have any segments archived yet it will just blindly blow past the timeline switch point and keeps on recovering on the old timeline. Typically that will eventually result in an error about incorrect prev-link, but under unhappy circumstances can result in standby silently having different contents.

Attached is a shell script that reproduces the issue. Goes back to at least v12, probably longer.

I think we should be keeping track of where the current replay timeline is going to end and not read any records past it on the old timeline. Maybe while at it, we should also track that the next record should be a checkpoint record for the timeline switch and error out if not. Thoughts?

--
Ants Aasma
Senior Database Engineer
www.cybertec-postgresql.com
Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: interrupted tap tests leave postgres instances around
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Avoid memory leaks during base backups