[MASSMAIL]Recovery of .partial WAL segments

Поиск
Список
Период
Сортировка
От Stefan Fercot
Тема [MASSMAIL]Recovery of .partial WAL segments
Дата
Msg-id PUrgXj3toL_CVxytc7fzYQNlY5FiUllklbS9UL1wU5ptiJAC2ChrF64EwO8neCKU9QnET5Zjv1HpMLFAgQPJQxOzM9f49jjkV56gEpUOYw8=@protonmail.com
обсуждение исходный текст
Список pgsql-hackers
Dear hackers,

Generating a ".partial" WAL segment is pretty common nowadays (using pg_receivewal or during standby promotion).
However, we currently don't do anything with it unless the user manually removes that ".partial" extension.

The 028_pitr_timelines tests are highlighting that fact: with test data being being in 000000020000000000000003 and
000000010000000000000003.partial,a recovery following the latest timeline (2) will succeed but fail if we follow the
currenttimeline (1). 

By simply trying to fetch the ".partial" file in XLogFileRead, we can easily recover more data and also cover that
(currenttimeline) recovery case. 

So, this proposed patch makes XLogFileRead try to restore ".partial" WAL archives and adds a test to 028_pitr_timelines
usingcurrent recovery_target_timeline. 

As far as I've seen, the current pg_receivewal tests only seem to cover the archives generation but not actually trying
torecover using it. I wasn't sure it was interesting to add such tests right now, so I didn't considered it for this
patch.

Many thanks in advance for your feedback and thoughts about this,
Kind Regards,
--
Stefan FERCOT
Data Egret (https://dataegret.com)
Вложения

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

Предыдущее
От: Morris de Oryx
Дата:
Сообщение: Re: Looking for an index that supports top-n searches by enforcing a max-n automatically
Следующее
От: shveta malik
Дата:
Сообщение: Re: Synchronizing slots from primary to standby