pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tender Wang <tndrwang@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
Date: Sat, 29 Jun 2024 06:37:12 +0200
Message-ID: <dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at> (raw)
In-Reply-To: <Zn9SDY0r9fLTqqDO@paquier.xyz>
References: <CAHewXNkyq88YBfCMbgnbquEwi+f5nyGOZ1axmo4ueLmkC=Am_A@mail.gmail.com>
	<202406281127.piekjwgnulgf@alvherre.pgsql>
	<Zn9SDY0r9fLTqqDO@paquier.xyz>

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





view thread (24+ messages)  latest in thread

Message-ID: <dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at>
Permalink:  ../dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at/
Also on:    postgresql.org/message-id/dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, michael@paquier.xyz, alvherre@alvh.no-ip.org, tndrwang@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
  In-Reply-To: <dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox