pgsql: Fix restore of partitions with exclusion constraints

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix restore of partitions with exclusion constraints
Date: 2026-07-20 15:22:35
Message-ID: E1wlppD-000000002hB-1LPp@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix restore of partitions with exclusion constraints

Commit 8c852ba9a4 allowed exclusion constraints to be added to
partitioned tables, but wasn't careful to verify that pg_restore worked
correctly for them. Fix that by making CompareIndexInfo() more
selective about what needs to be rejected.

Author: Japin Li <japinli(at)hotmail(dot)com>
Reported-by: Keith Paskett <keith(dot)paskett(at)logansw(dot)com>
Discussion: https://postgr.es/m/2A40921D-83AB-411E-ADA6-7E509A46F1E4@logansw.com

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/19e3aa704126f34f8fa4b36109478a7e6727a5e5

Modified Files
--------------
src/backend/catalog/index.c | 16 ++++++++++++++--
src/test/regress/expected/indexing.out | 15 +++++++++++++++
src/test/regress/sql/indexing.sql | 14 ++++++++++++++
3 files changed, 43 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2026-07-20 18:08:24 pgsql: doc: Granting TRIGGER or REFERENCES on table is dangerous.
Previous Message Fujii Masao 2026-07-20 12:43:19 pgsql: Avoid ERROR in recovery target GUC assign hooks