Re: BUG #18559: Crash after detaching a partition concurrently from another session

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Cc: Alvaro Herrera from 2ndQuadrant <alvherre(at)alvh(dot)no-ip(dot)org>, Tender Wang <tndrwang(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18559: Crash after detaching a partition concurrently from another session
Date: 2024-08-18 14:46:45
Message-ID: CAEG8a3L-4qyFUQO=ARZu+=-owVbW8oJziDH0GcU9GYt0__jYvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 16, 2024 at 3:32 AM Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> wrote:
>
> On Tue, Aug 13, 2024 at 11:49 PM Alvaro Herrera from 2ndQuadrant
> <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > > That means - after getting the live partitions from
> > > prune_append_rel_partitions(), by the time the code tries to lock a
> > > child, it's already dropped.
> >
> > Right.
> >
> > > However, similar check is not there in expand_partitioned_rtentry().
> > > Introducing the same check will fix the issue. But, I don't know how
> > > it affects the pruning part as this partition couldn't be pruned
> > > earlier and that's why we're opening the child partition.
> >
> > Hmm, we could just remove the partition from the set of live partitions
> > -- then it should behave the same as if the partition had been pruned.
> > Something like the attached, perhaps.
> >
> Thanks for the patch. LGTM. I've verified that it's fixing the issue.
>
+1

>
>
> --
> Thanks & Regards,
> Kuntal Ghosh

--
Regards
Junwang Zhao

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Joseph Koshakow 2024-08-18 17:02:02 Re: BUG #18585: Date/time conversion functions are not protected against integer overflow
Previous Message Daniel Gustafsson 2024-08-17 21:27:43 Re: TLS session tickets disabled?