From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18871: Cross-partition MERGE fails with unclear internal error |
Date: | 2025-03-28 16:39:58 |
Message-ID: | CAHewXNmteprb6V1REydM7ehMB0nM9RX4FAEkAFseC2hOy0rY=w@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> 于2025年3月28日周五 22:49写道:
> The following bug has been logged on the website:
>
> Bug reference: 18871
> Logged by: Alexander Lakhin
> Email address: exclusion(at)gmail(dot)com
> PostgreSQL version: 17.4
> Operating system: Ubuntu 24.04
> Description:
>
> The following script:
> CREATE TABLE pt(a int, b int) PARTITION BY LIST(a);
> CREATE TABLE p1 PARTITION OF pt FOR VALUES IN (a);
>
> MERGE INTO pt USING (SELECT 2 AS a) AS q ON pt.a = q.a
> WHEN NOT MATCHED THEN INSERT VALUES (1, 2)
> WHEN MATCHED THEN DO NOTHING;
> fails with:
> ERROR: XX000: unknown action in MERGE WHEN clause
> LOCATION: ExecInitPartitionInfo, execPartition.c:962
>
> This error is triggered on REL_15_STABLE (starting from bf5c4b3d9) ..
> master.
> Before bf5c4b3d9, the MERGE produced ERROR: variable not found in subplan
> target lists.
>
> This anomaly is discovered with SQLsmith.
>
I tried a quick fix by adding "case CMD_NOTHING" after "case CMD_DELETE"
like below:
case CMD_DELETE:
case CMD_NOTHING:
break;
It can work, and all regression tests pass. But I don't look into more
details. This solution may not fix the root cause.
--
Thanks,
Tender Wang
From | Date | Subject | |
---|---|---|---|
Next Message | Vinhson Nguyen | 2025-03-28 18:24:22 | PostgreSQL JDBC 42.7.5 returns an unexpected catalog name |
Previous Message | Alexander Lakhin | 2025-03-28 06:00:00 | Re: BUG #18832: Segfault in GrantLockLocal |