Re: MERGE behavior with REPEATABLE READ isolation level

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: MERGE behavior with REPEATABLE READ isolation level
Date: 2026-02-24 09:09:54
Message-ID: CAEZATCWb_EhJZRgZVZxhLn328F-VsUUYjkQPrKkVyYiX-2Viow@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 24 Feb 2026 at 03:13, Tender Wang <tndrwang(at)gmail(dot)com> wrote:
>
> Alexander Korotkov <aekorotkov(at)gmail(dot)com> 于2026年2月15日周日 09:23写道:
> >
> > I found it strange that ExecMergeMatched() checks for IsolationUsesXactSnapshot() in the TM_Deleted case, but not in the TM_Updated case.
>
> I tried "update test set val = val + 100;" but the SQL reported a
> "could not serialize access due to concurrent update" error.
> It seems that the MERGE command should behave identically to UPDATE
> when performing a match action.
>

Yes, I agree. I think this is a bug (probably just an oversight in the
original MERGE commit).

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-24 09:42:06 pgsql: Allow ALTER COLUMN SET EXPRESSION on virtual columns with CHECK
Previous Message Amit Langote 2026-02-24 08:45:48 Re: More speedups for tuple deformation