Re: wrong results: merge when not matched by source

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: wrong results: merge when not matched by source
Date: 2026-09-19 08:43:07
Message-ID: CAEZATCVw4RX68r-hd1tXgHtY_AG9y4EBMABuq_+jQX6y1gfVfQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 18 Sept 2026 at 13:52, Tender Wang <tndrwang(at)gmail(dot)com> wrote:
>
> I also noticed the following part of the comment at the beginning of
> `ExecMerge()`:
>
> If the target tuple gets deleted or a concurrent update causes the join
> quals to fail, it returns a matched status of false and we call
> ExecMergeNotMatched().
>
> With this change, perhaps this part of the comment should also be
> adjusted to distinguish an original `WHEN MATCHED` case from an
> original `WHEN NOT MATCHED BY SOURCE` case.
>
> Do you think it's worth updating this comment as part of the patch?

OK, here is an update doing that.

Since a new v19 beta is about to be released, I'll hold off on pushing
this until later next week.

Regards,
Dean

Attachment Content-Type Size
v3-0001-Fix-concurrent-delete-handling-in-MERGE-.-WHEN-NO.patch text/x-patch 13.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2026-09-19 10:29:16 Re: BUG #19693: JSON_VALUE/JSON_QUERY PASSING a toasted text value reads the toast pointer instead of the text
Previous Message PG Bug reporting form 2026-09-19 05:17:25 BUG #19701: GIN trigram index loses rows at similarity_threshold 0