Re: pg_restore error with partitioned table having exclude constraint

From: Japin Li <japinli(at)hotmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Keith Paskett <keith(dot)paskett(at)logansw(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore error with partitioned table having exclude constraint
Date: 2025-04-29 14:44:16
Message-ID: ME0P300MB044557324719C06120ACBC2EB6802@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 28 Apr 2025 at 10:42, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
> On 2025-Apr-24, Japin Li wrote:
>
>> On Thu, 17 Apr 2025 at 17:18, Álvaro Herrera <alvherre(at)kurilemu(dot)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.
>>
>> Sorry, I’m unclear on “more work.” Can you explain further?
>
> Well, there are no tests in the patch. 8c852ba9a434 added some, but
> it's now clear that something was overlooked. I think this patch should
> make more of an effort to cover all interesting cases in regression
> tests if there are holes in coverage; and also add something to verify
> that pg_dump and pg_upgrade work correctly for these constraints.
>

My understanding, based on the src/bin/pg_dump tests, is that they don't
involve a genuine restore of the dumped data to a database. Instead, it
dumps to a file using pg_restore. Is that correct?

I doubt whether I can add a test to pg_dump that would cover this issue.

--
Regrads,
Japin Li

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Álvaro Herrera 2025-04-29 14:53:52 Re: pg_restore error with partitioned table having exclude constraint
Previous Message David Rowley 2025-04-29 12:55:52 Re: BUG #18904: INTERSECT with an impossible where should eliminateboth from the query plan