Re: A comment fix in xlogreader.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: A comment fix in xlogreader.c
Date: 2019-09-26 02:57:59
Message-ID: 20190926025759.GB2115@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 26, 2019 at 11:08:09AM +0900, Kyotaro Horiguchi wrote:
> While rechecking another patch, I found that 709d003fbd forgot to
> edit a comment mentioning three members removed from
> XLogReaderState.
>
@@ -103,8 +103,7 @@ XLogReaderAllocate(int wal_segment_size, const char *waldir,
state->read_page = pagereadfunc;
/* system_identifier initialized to zeroes above */
state->private_data = private_data;
- /* ReadRecPtr and EndRecPtr initialized to zeroes above */
- /* readSegNo, readOff, readLen, readPageTLI initialized to zeroes above */
+ /* ReadRecPtr, EndRecPtr and readLen initialized to zeroes above */
state->errormsg_buf = palloc_extended(MAX_ERRORMSG_LEN + 1,
MCXT_ALLOC_NO_OOM);
if (!state->errormsg_buf)

I see. readSegNo and readOff have been moved to WALOpenSegment and
replaced by new, equivalent fields, still all those three fields are
still initialized for the palloc_extended() call to allocate
XLogReaderState, while the two others are now part of
WALOpenSegmentInit(). Your change is correct, so applied.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-09-26 03:47:07 Re: pgbench - allow to create partitioned tables
Previous Message Kyotaro Horiguchi 2019-09-26 02:08:09 A comment fix in xlogreader.c