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-05 11:31:06
Message-ID: CAA4eK1+L-QLPmdwWYJsUmaB_ZHZT-OXoV=meR9cxFWOedYqxLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2023-09-05 11:51:28 Re: BUG #18086: compilation failed due to epoll_create1 not present
Previous Message Duke Astar 2023-09-05 11:01:40 Re: BUG #18082: coredump during initdb