Re: XLogBeginRead's header comment lies

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-08-17T14:57:27Z
Lists: pgsql-hackers
On Wed, Aug 17, 2022 at 6:53 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> Thinking again, there is already a code in XLogDecodeNextRecord() to
> error out if XLP_FIRST_IS_CONTRECORD is set so probably we don't need
> to do anything else and the previous patch with modified assert should
> just work fine?

Yeah, that looks right to me. I'm inclined to commit your patch with
some changes to wording of the comments. I'm also inclined not to
back-patch, since we don't know that this breaks anything for existing
users of the xlogreader facility.

If anyone doesn't want this committed or does want it back-patched,
please speak up.

Thanks,

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Adjust assertion in XLogDecodeNextRecord.