pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Michael Paquier <michael@paquier.xyz>
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 19:56:44 +0200
Message-ID: <202406291756.2d3bmapza7z5@alvherre.pgsql> (raw)
In-Reply-To: <dae50f0b1c8d39734caf2363206596ec97de4c9e.camel@cybertec.at>

On 2024-Jun-29, Laurenz Albe wrote:

> My example that triggered this assert runs just fine on v16.

Well, in a build without assertions enabled then yes it doesn't crash.
But if you do have asserts enabled in 16, it does crash.

> 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...

The error would not occur on detach, but on attach, and it'd be intended
to prevent an inconsistent situation.  I'm proposing that on older
branches we do what Tender proposed elsewhere, namely to cope with the
detach without crashing (and without leaving inconsistent catalog state,
such as bogus coninhcount values).

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Pero la cosa no es muy grave ..."     (le petit Nicolas -- René Goscinny)





view thread (24+ messages)  latest in thread

Message-ID: <202406291756.2d3bmapza7z5@alvherre.pgsql>
Permalink:  ../202406291756.2d3bmapza7z5@alvherre.pgsql/
Also on:    postgresql.org/message-id/202406291756.2d3bmapza7z5@alvherre.pgsql

 · 

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: alvherre@alvh.no-ip.org, laurenz.albe@cybertec.at, michael@paquier.xyz, 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: <202406291756.2d3bmapza7z5@alvherre.pgsql>

* 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