Re: pg_walinspect: ReadNextXLogRecord's first_record argument

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-17T15:22:32Z
Lists: pgsql-hackers
On Wed, Aug 17, 2022 at 12:41 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> Agreed.
>
> Here's a patch (for V15 as well) fixing this bug, please review.

Couldn't you simplify this further by removing the lsn argument from
GetWALRecordInfo and using record->ReadRecPtr instead? Then
InitXLogReaderState's second argument could be XLogRecPtr instead of
XLogRecPtr *.

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



Commits

  1. Use correct LSN for error reporting in pg_walinspect