Re: pg_restore error with partitioned table having exclude constraint - Mailing list pgsql-bugs

From Keith Paskett
Subject Re: pg_restore error with partitioned table having exclude constraint
Date
Msg-id A57040BA-B461-43DB-B527-047FC68D152D@logansw.com
Whole thread Raw
In response to Re: pg_restore error with partitioned table having exclude constraint  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-bugs
I’m pretty sure that I saw support for exclusion constraints in the PG17 release notes,
and added them to tables that weren’t able to use them in PG16.

They worked great. I just discovered the issue with pg_dump/pg_restore.
The restored tables actually still work because the partition tables have the proper constraint.
Even new partition tables created after the pg_restore get the correct constraint.

Can I assume that the patch will get incorporated into a future release,
and not that exclusion constraints on partition tables will be disallowed?

-Keith


On Apr 17, 2025, at 9:18 AM, Álvaro Herrera <alvherre@kurilemu.de> wrote:

On 2025-Apr-17, Japin Li wrote:

It seems PG 16 does not support exclusion constraints on partitioned tables.

Yeah, my recollection is that they were purposefully disallowed (mainly
because I didn't want to research how to fully make them work when
adding local partitioned indexes), and that we needed to do more work if
we wanted to let them through.  I suspect commit 8c852ba9a4 was mistaken
to allow that case without looking for further implications.

--
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"On the other flipper, one wrong move and we're Fatal Exceptions"
(T.U.X.: Term Unit X  - http://www.thelinuxreview.com/TUX/)

pgsql-bugs by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: pg_restore error with partitioned table having exclude constraint
Next
From: Nico Williams
Date:
Subject: Re: PostgreSQL v15.12 fails to perform PG_UPGRADE from v13 and v9 on Windows