Re: BUG #18741: Detaching a partition referencing a partitioned table fails with a trigger-related error

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: BUG #18741: Detaching a partition referencing a partitioned table fails with a trigger-related error
Date: 2025-05-03 01:22:48
Message-ID: CAHewXNmmU70OsO=P2F9RxitY2EdLxSOrA=tUHP0N-6wS99SYTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> 于2024年12月8日周日 22:43写道:

> The following bug has been logged on the website:
>
> Bug reference: 18741
> Logged by: Alexander Lakhin
> Email address: exclusion(at)gmail(dot)com
> PostgreSQL version: 17.2
> Operating system: Ubuntu 22.04
> Description:
>
> The following script:
> CREATE TABLE pt1 (a int PRIMARY KEY) PARTITION BY RANGE (a);
> CREATE TABLE p1 PARTITION OF pt1 FOR VALUES FROM (0) TO (1);
>
> CREATE TABLE pt2 (a int) PARTITION BY RANGE (a);
> CREATE TABLE p2 (a int, FOREIGN KEY (a) REFERENCES pt1);
>
> ALTER TABLE pt2 ATTACH PARTITION p2 FOR VALUES FROM (0) TO (1);
> ALTER TABLE pt2 DETACH PARTITION p2;
>
> fails with:
> ERROR: XX000: could not find ON INSERT check triggers of foreign key
> constraint 16404
> LOCATION: GetForeignKeyCheckTriggers, tablecmds.c:11355
>
> Reproduced on REL_15_STABLE (starting from f4566345c) .. master.
>
>
Hi,

This issue can't be reproduced on HEAD. I guess a commit happened to solve
this problem.
--
Thanks,
Tender Wang

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tender Wang 2025-05-03 01:50:41 Re: BUG #18902: TRAP:: failed Assert("!is_sorted") in File: "createplan.c"
Previous Message Sergey Koposov 2025-05-02 22:44:19 Re: BUG #18909: Query creates millions of temporary files and stalls