I wrote:
> Another thing that's bothering me is that the patch compares page LSN
> against GetInsertRecPtr(); but that function says
> ...
> I'm not convinced that an approximation is good enough here. It seems
> like a page that's just now been updated could have an LSN beyond the
> current XLOG page start, potentially leading to a false checksum
> complaint. Maybe we could address that by adding one xlog page to
> the GetInsertRecPtr result? Kind of a hack, but ...
Actually, after thinking about that a bit more: why is there an LSN-based
special condition at all? It seems like it'd be far more useful to
checksum everything, and on failure try to re-read and re-verify the page
once or twice, so as to handle the corner case where we examine a page
that's in process of being overwritten.
regards, tom lane