On 2018-01-12 10:45:54 -0500, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Sat, Dec 30, 2017 at 5:32 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > I have some reservations about whether this makes the mechanism less
> > reliable.
>
> Yeah, it scares me too.
Same here.
> The xl_prev field is our only way of detecting that we're looking at
> old WAL data when we cross a sector boundary.
Right. I wonder if it be reasonable to move that to a page's header
instead of individual records? To avoid torn page issues we'd have to
reduce the page size to a sector size, but I'm not sure that's that bad?
> > Of course, we also have xl_crc, so I'm not sure whether there's any
> > chance of real harm...
>
> The CRC only tells you that you have a valid WAL record, it won't clue
> you in that it's old data you shouldn't replay.
Yea, I don't like relying on the CRC alone at all.
Greetings,
Andres Freund