Re: Misleading comment in prologue of ReorderBufferQueueMessage

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Misleading comment in prologue of ReorderBufferQueueMessage
Date: 2020-12-15 05:55:00
Message-ID: CAGEoWWRd-Ff5c+WwcZ_mVGobyZX+S2rmtt_iOpgMvmrLnTsxfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 14, 2020 at 3:14 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Mon, Dec 14, 2020 at 2:45 PM Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> >
> > The name of the function suggests that the given message will be queued
> in ReorderBuffer. The prologue of the function says so too
> > 776 /*
> > 777 * Queue message into a transaction so it can be processed upon
> commit.
> > 778 */
> > It led me to think that a non-transactional message is processed along
> with the surrounding transaction, esp. when it has an associated xid.
> >
> > But in reality, the function queues only a transactional message and
> decoders a non-transactional message immediately without waiting for a
> commit.
> >
> > We should modify the prologue to say
> > "Queue a transactional message into a transaction so that it can be
> processed upon commit. A non-transactional message is processed
> immediately." and also change the name of the function to
> ReorderBufferProcessMessage(), but the later may break API compatibility.
> >
>
> +1 for the comment change but I am not sure if it is a good idea to
> change the API name.
>
> Can you please review wording? I will create a patch with updated wording.
--
--
Best Wishes,
Ashutosh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-12-15 06:40:03 Re: Add Information during standby recovery conflicts
Previous Message Jammie 2020-12-15 05:30:11 Re: Movement of restart_lsn position movement of logical replication slots is very slow