Re: pg_walinspect: ReadNextXLogRecord's first_record argument

2022-08-17 Thread Robert Haas
On Wed, Aug 17, 2022 at 12:29 PM Bharath Rupireddy wrote: > PSA v2 patches. These look OK to me. -- Robert Haas EDB: http://www.enterprisedb.com

Re: pg_walinspect: ReadNextXLogRecord's first_record argument

2022-08-17 Thread Bharath Rupireddy
On Wed, Aug 17, 2022 at 8:52 PM Robert Haas wrote: > > On Wed, Aug 17, 2022 at 12:41 AM Bharath Rupireddy > 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 u

Re: pg_walinspect: ReadNextXLogRecord's first_record argument

2022-08-17 Thread Robert Haas
On Wed, Aug 17, 2022 at 12:41 AM Bharath Rupireddy 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 ar

Re: pg_walinspect: ReadNextXLogRecord's first_record argument

2022-08-16 Thread Bharath Rupireddy
On Tue, Aug 16, 2022 at 10:04 PM Robert Haas wrote: > > Hi, > > I was looking at the code for pg_walinspect today and I think I may > have found a bug (or else I'm confused about how this all works, which > is also possible). ReadNextXLogRecord() takes an argument first_record > of type XLogRecPtr