| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> | 
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
| Cc: | Tender Wang <tndrwang(at)gmail(dot)com>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert | 
| Date: | 2024-06-29 04:37:12 | 
| Message-ID: | dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On Sat, 2024-06-29 at 09:15 +0900, Michael Paquier wrote:
> > Here's a proposed patch for master only.  It turns all three situations
> > being reported into ereport(ERROR); in one case I have an XXX comment,
> > because we have an alternative when attaching a partition that already
> > has a PK to a partitioned table that has a non-PK index: just create a
> > separate index in the partition.  But that would cause slowness, which
> > is probably undesirable.  I'm inclined to just remove the XXX comment,
> > but if anyone has other thoughts, they are welcome.
> 
> An error sounds saner here in the long term.
> 
> Tests for all of the code paths involved, perhaps?  ;)
My example that triggered this assert runs just fine on v16.
So while an error is clearly better than a crash, that would constitute
a regression.  Is that really unavoidable?  It would be very unfortunate
if the only way to detach a partition would be to drop some indexes first...
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2024-06-29 17:56:44 | Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert | 
| Previous Message | Michael Paquier | 2024-06-29 00:15:09 | Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert |