| From: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com |
| Subject: | Re: Crashes on a partition whose concurrent detach never finished |
| Date: | 2026-09-11 06:00:41 |
| Message-ID: | CABdArM4XHF-Xvp9tRt-hh5CT1mE7fyHS4SoNG20PApJXS00T2A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Sep 11, 2026 at 10:41 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Thu, Sep 10, 2026 at 7:40 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
> >
> > On Thu, Sep 10, 2026 at 5:37 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> > > > ~~~
> > > >
> > > > Given that we are treating a detach-pending partition as an individual
> > > > table for publication decisions, the changes in patch-003 (pg19
> > > > regression) look correct to me. The changes in relcache.c correctly
> > > > treat the detach-pending partition as an individual table.
> > > >
> > >
> > > I haven't had a chance to reveiw 003 yet as 001 itself was
> > > problematic. Will review it tomorrow.
> > >
> >
> > Here is a rebased version of 003 that applies independently on both
> > HEAD and pg19. This should make reviewing patch-003 separately easier.
> >
>
> Okay, the fix looks good. I verified that it fixes the crash on HEAD.
> But it would be good to change the fix slightly to be consistent with
> 001. See the attached changes for reference.
>
Thanks for sharing the patch. It looks good to me. I’ve updated the
attached patch accordingly.
One additional improvement:
The error message when trying to add a detach-pending partition to the
EXCEPT clause was misleading:
ERROR: cannot specify relation "public.child" in the publication EXCEPT clause
DETAIL: This operation is not supported for individual partitions.
The relation is no longer a partition in this state; it is in
detach-pending. I’ve updated the error message to make this clearer:
ERROR: cannot specify relation "public.child" in the publication EXCEPT clause
DETAIL: This operation is not supported for partitions with an
incomplete detach.
HINT: Use ALTER TABLE ... DETACH PARTITION ... FINALIZE to complete
the pending detach operation.
--
Thanks,
Nisha
| Attachment | Content-Type | Size |
|---|---|---|
| v3_003-0001-Fix-crash-on-UPDATE-or-DELETE-of-a-partition-.patch | application/x-patch | 8.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-09-11 06:04:10 | Re: Review items for EXCEPT TABLE publication |
| Previous Message | Amit Kapila | 2026-09-11 05:51:27 | Re: Review items for EXCEPT TABLE publication |