Re: Fetching timeline during recovery

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Fetching timeline during recovery
Дата
Msg-id 7CD8D11F-B1C3-413F-852F-53A7642D579A@yandex-team.ru
обсуждение исходный текст
Ответ на Fetching timeline during recovery  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Ответы Re: Fetching timeline during recovery  (David Steele <david@pgmasters.net>)
Список pgsql-hackers

> 23 июля 2019 г., в 21:05, Jehan-Guillaume de Rorthais <jgdr@dalibo.com> написал(а):
>
> Fetching the timeline from a standby could be useful in various situation.
> Either for backup tools [1] or failover tools during some kind of election
> process.
That backup tool is reading timeline from pg_control_checkpoint(). And formats WAL file name itself when necessary.

> Please, find in attachment a first trivial patch to support pg_walfile_name()
> and pg_walfile_name_offset() on a standby.

You just cannot format WAL file name for LSN when timeline changed. Because there are at least three WALs for that
point:previous, new and partial. However, reading TLI from checkpoint seems safe for backup purposes. 
The only reason for WAL-G to read that timeline is to mark backup invalid: if it's name is
base_00000001XXXXXXXXYY00000YYand timeline change happens, it should be named base_00000002XXXXXXXXYY00000YY
(consistencypoint is not on TLI 2), but WAL-G cannot rename backup during backup-push. 

Hope this information is useful. Thanks!

Best regards, Andrey Borodin.

[0] https://github.com/wal-g/wal-g/blob/master/internal/timeline.go#L39


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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: pgbench - allow to create partitioned tables
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCH] Improve performance of NOTIFY over many databases (issueblocking on AccessExclusiveLock on object 0 of class 1262 of database 0)