Hi Fujii,

EndRecPtr is the starting position for the next read, which does not
> always correspond to the start of the failing record. No? For example,
> if decoding fails on the first record after a page header, EndRecPtr
> still points to the start of the page?
>

Yes, you're right. When the next record starts right after a page header,
 EndRecPtr points to the start of the page, so the prefix would be off
  by the header size there. The LSN at the end of the message, from
0001, is still exact, since XLogDecodeNextRecord() skips any page header
before passing RecPtr to
DecodeXLogRecord().


> OTOH, if the goal is consistency with pg_rewind and pg_walinspect,
> I'm fine with using EndRecPtr. But, as with 0001, I don't think the test
> change in 0002 is necessary.


0002  is mainly a consistency change with pg_rewind and pg_walinspect.

Regards,
Surya Poondla

Reply via email to