Re: BUG #18055: logical decoding core on AllocateSnapshotBuilder()

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "ocean_li_996(at)163(dot)com" <ocean_li_996(at)163(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
Date: 2023-09-12 10:09:05
Message-ID: CAA4eK1JdnOsFhwVp2LbAg2KP_K_vXaB9Z+N6wfZ873FGUDNPQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Sep 9, 2023 at 5:09 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Sep 7, 2023 at 5:40 PM Zhijie Hou (Fujitsu)
> <houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> >
> > On Tuesday, September 5, 2023 7:31 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > >
> > > On Fri, Aug 25, 2023 at 9:36 AM Zhijie Hou (Fujitsu) <houzj(dot)fnst(at)fujitsu(dot)com>
> > > wrote:
> > > >
> > > > On Wednesday, August 23, 2023 4:47 PM Amit Kapila
> > > <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > > >
> > > > > On Mon, Aug 21, 2023 at 11:57 PM Andres Freund <andres(at)anarazel(dot)de>
> > > > > wrote:
> > > > > >
> > > > > > -1. This makes things global concerns that shouldn't be.
> > > > > >
> > > > > > If we really need something to clean this up, I'd look at
> > > > > > MemoryContextRegisterResetCallback().
> > > > > >
> > > > >
> > > > > +1. This sounds like a better idea.
> > > >
> > > > Here is a small patch based on this idea.
> > > > I registered the callback under snapshot builder context and the
> > > > callback will reset the variables.
> > > >
> > >
> > > LGTM. Unless Andres or Sawada-San thinks otherwise, I would like to proceed
> > > with this fix.
> >
> > Thanks, attach the patches for all support branches. I have confirmed that they can
> > pass the regression test and fix the issue.
> >
>
> I have also verified and it works for me as well. I'll push this (from
> PG11-PG15) next week by Tuesday unless there are more comments.
>

Pushed.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2023-09-12 10:43:47 Re: [16+] subscription can end up in inconsistent state
Previous Message Gokul Krishnan 2023-09-12 09:06:03 Re: BUG #18098: Console code page issue Postgresql 14.7