Re: Remove page-read callback from XLogReaderState.

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: alvherre(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove page-read callback from XLogReaderState.
Date: 2020-01-26 09:40:05
Message-ID: 725e0e1c-9df8-cdb9-ca5d-45a6efba2725@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/01/2020 12:45, Kyotaro Horiguchi wrote:
> At Mon, 20 Jan 2020 17:24:07 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
>> Separating XLogBeginRead seems reasonable. The annoying recptr trick
>> is no longer needed. In particular some logical-decoding stuff become
>> far cleaner by the patch.
>>
>> fetching_ckpt of ReadRecord is a bit annoying but that coundn't be
>> moved outside to, say, ReadCheckpointRecord in a clean way. (Anyway
>> XLogBeginRead is not the place, of course).
>>
>> As I looked through it, it looks good to me but give me some more time
>> to look closer.
>
> It seems to me that it works perfectly, and everything looks good to
> me except one point.
>
> - * In this case, the passed-in record pointer should already be
> + * In this case, EndRecPtr record pointer should already be
>
> I'm not confident but isn't the "record pointer" redundant? EndRecPtr
> seems containing that meaning, and the other occurances of that kind
> of variable names are not accompanied by that.

I fixed that, fixed the XLogFindNextRecord() function so that it
positions the reader like XLogBeginRead() does (I had already adjusted
the comments to say that, but the function didn't actually do it), and
pushed. Thanks for the review!

I'll continue looking at the callback API changes on Monday.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2020-01-26 09:42:32 Re: Remove page-read callback from XLogReaderState.
Previous Message Vik Fearing 2020-01-26 05:52:05 Re: Greatest Common Divisor