Re: Deduplicate logicalrep_read_tuple() - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Deduplicate logicalrep_read_tuple()
Date
Msg-id CAA4eK1KTPUw0f=9fzDr31i1qeLm9yTXp0abu5TPbFdjNM-zyyA@mail.gmail.com
Whole thread Raw
In response to Re: Deduplicate logicalrep_read_tuple()  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Deduplicate logicalrep_read_tuple()  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Fri, Mar 3, 2023 at 4:13 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Thu, Jan 19, 2023 at 8:36 AM Peter Smith <smithpb2250@gmail.com> wrote:
> >
> > On Wed, Jan 18, 2023 at 6:26 PM Bharath Rupireddy
> > <bharath.rupireddyforpostgres@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > logicalrep_read_tuple() duplicates code for LOGICALREP_COLUMN_TEXT and
> > > LOGICALREP_COLUMN_BINARY introduced by commit 9de77b5. While it
> > > doesn't hurt anyone, deduplication makes code a bit leaner by 57 bytes
> > > [1]. I've attached a patch for $SUBJECT.
> > >
> > > Thoughts?
> > >
> >
> > The code looks the same but there is a subtle comment difference where
> > previously only LOGICALREP_COLUMN_BINARY case said:
> >  /* not strictly necessary but per StringInfo practice */
> >
> > So if you de-duplicate the code then should that comment be modified to say
> > /* not strictly necessary for LOGICALREP_COLUMN_BINARY but per
> > StringInfo practice */
>
> Thanks. Done so in the attached v2.
>

LGTM. Unless Peter or someone has any comments on this, I'll push this
early next week.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Michael Paquier
Date:
Subject: Re: Add documentation for coverage reports with meson