From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: hlinnaka@iki.fi
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page
Date: Tue, 20 Nov 2018 06:37:36 +0500
Message-ID: <5423cf66-cd12-96d0-abf0-1776d466bfaa@postgrespro.ru> (raw)
In-Reply-To: <20181120013056.GH4400@paquier.xyz>
References: <2553f2b0-0e39-eb0e-d382-6c0ed08ca8ae@postgrespro.ru>
<20181026.143300.212568635.horiguchi.kyotaro@lab.ntt.co.jp>
<ea3dca6a-b898-e7a8-dcfa-b3ad227a6349@postgrespro.ru>
<20181115.181238.258013477.horiguchi.kyotaro@lab.ntt.co.jp>
<20181116062355.GE6613@paquier.xyz>
<49518b48-2036-5e43-1818-0f594e375e76@postgrespro.ru>
<20181120013056.GH4400@paquier.xyz>
On 20.11.2018 6:30, Michael Paquier wrote:
> On Mon, Nov 19, 2018 at 10:48:06AM +0500, Andrey Lepikhov wrote:
>> According to my experience, I clarify some comments to avoid this mistakes
>> in the future (see attachment).
>
> No objections from here.
>
>> - * The returned pointer (or *errormsg) points to an internal buffer that's
>> - * valid until the next call to XLogReadRecord.
>> + * The returned pointer (or *errormsg) points to an internal read-only buffer
>> + * that's valid until the next call to XLogReadRecord.
>
> Not sure that this bit adds much.
Ok
>
>> - /* Buffer for current ReadRecord result (expandable) */
>> + /*
>> + * Buffer for current ReadRecord result (expandable).
>> + * Used in the case, than current ReadRecord result don't fit on the
>> + * currently read WAL page.
>> + */
>
> Yeah, this one is not entirely true now. What about the following
> instead:
> - /* Buffer for current ReadRecord result (expandable) */
> + /*
> + * Buffer for current ReadRecord result (expandable), used when a record
> + * crosses a page boundary.
> + */
I agree
--
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: a.lepikhov@postgrespro.ru, michael@paquier.xyz, horiguchi.kyotaro@lab.ntt.co.jp, hlinnaka@iki.fi
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page
In-Reply-To: <5423cf66-cd12-96d0-abf0-1776d466bfaa@postgrespro.ru>
References: <2553f2b0-0e39-eb0e-d382-6c0ed08ca8ae@postgrespro.ru> <20181026.143300.212568635.horiguchi.kyotaro@lab.ntt.co.jp> <ea3dca6a-b898-e7a8-dcfa-b3ad227a6349@postgrespro.ru> <20181115.181238.258013477.horiguchi.kyotaro@lab.ntt.co.jp> <20181116062355.GE6613@paquier.xyz> <49518b48-2036-5e43-1818-0f594e375e76@postgrespro.ru> <20181120013056.GH4400@paquier.xyz> <5423cf66-cd12-96d0-abf0-1776d466bfaa@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox