Re: REPACK (CONCURRENTLY) can crash a logical decoding session - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: REPACK (CONCURRENTLY) can crash a logical decoding session
Date
Msg-id CAD21AoC8tp3Dq3Bq3T7_0C0dNWRBSbADQez7kMp1gdcazB+neQ@mail.gmail.com
Whole thread
In response to REPACK (CONCURRENTLY) can crash a logical decoding session  (Thom Brown <thom@linux.com>)
List pgsql-hackers
On Tue, Sep 8, 2026 at 2:12 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Sun, Sep 6, 2026 at 9:18 AM Zhijie Hou (Fujitsu)
> <houzj.fnst@fujitsu.com> wrote:
> >
> > Hi
> >
> > On Saturday, September 5, 2026 3:17 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > > I've attached the updated patches. I merged Antonin's two patches into one
> > > with some cosmetic changes and the 0002 patch fixes issue (2).
> > > Please review them.
> >
> > Both fixes look good to me. Just one question for the 0002.
> >
> > +       /*
> > +        * Ignore update records without a new tuple.  This happens when the
> > +        * caller of heap_update() asked for the change not to be decoded, as
> > +        * REPACK (CONCURRENTLY) does for the transient heap.
> > +        */
> > +       if (!(xlrec->flags & XLH_UPDATE_CONTAINS_NEW_TUPLE))
> > +               return;
> >
> > It seems to me that updates on catalog relations with no new tuple will also be
> > skipped after this patch. I think that's fine, but perhaps we could mention this
> > case in the comment to make the behavior clearer.
>
> Good point. I've updated the comment accordingly and attached the
> updated patches.
>
> Also, I've fixed a whitespace issue in the 0001 patch.

The patches look good to me so I'm going to push them, barring any objections.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Bryan Green
Date:
Subject: Re: COPY FROM with RLS
Next
From: Robert Haas
Date:
Subject: Re: pg_*_advice: tsv load failure, etc.