Re: BUG #18871: Cross-partition MERGE fails with unclear internal error

Gurjeet Singh <gurjeet@singh.im>

From: "Gurjeet Singh" <gurjeet@singh.im>
To: "Tender Wang" <tndrwang@gmail.com>, "Dean Rasheed" <dean.a.rasheed@gmail.com>
Cc: <exclusion@gmail.com>, <pgsql-bugs@lists.postgresql.org>
Date: 2025-03-29T05:54:50Z
Lists: pgsql-bugs

Attachments

On Fri Mar 28, 2025 at 7:39 PM PDT, Tender Wang wrote:

> In ExecInitPartitionInfo(), it has comments like:
>
> * This duplicates much of the logic in ExecInitMerge(), so something
> * changes there, look here too.
>
> ExecInitMerge() considers CMD_NOTHING operation.
> I give the attached fix.

I would've expecetd the comment to be in ExecInitMerge(), asking the
reader to look at other places the logic is duplicated.

Attached is a patch with an attempt at that; it includes the diff from
your patch, too, so I named it v2.

Best regards,
Gurjeet
http://Gurje.et

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix MERGE with DO NOTHING actions into a partitioned table.