Hi,

Moving the corner case I mentioned in the BUG #19774 thread [1] here,
as Fujii-san suggested.

IIUC, a standby can summarize WAL ahead of replay. So if recovery
ends at the start of one of those summaries, we could still have an
old-timeline summary for WAL we didn't replay. FilterWalSummaries()
seems to keep that file, unlike GetWalSummaries().

My worry was that a truncation in that summary could drop block
references from the new timeline when we merge it. We'd then miss
those blocks in the incremental backup and take stale ones from the
earlier backup instead.

The attached patch makes the >= / <= checks match GetWalSummaries().

I have a TAP reproducer, but it's fairly involved, so I've kept it out
of the patch for now. Happy to share it if it's useful.

[1] https://postgr.es/m/[email protected]

Regards,
Ayush

Attachment: v1-0001-Use-half-open-LSN-ranges-in-FilterWalSummaries.patch
Description: Binary data

Reply via email to