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-09 11:39:04
Message-ID: CAA4eK1Jo5kWsKvWY6KUfLMV4-uD+_11+ywgWLkTCK_J1LBNc6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-09-09 19:18:07 Re: BUG #18097: Immutable expression not allowed in generated at
Previous Message Alexander Lakhin 2023-09-09 08:00:00 Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize