| From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix handling of updated tuples in the MERGE statement |
| Date: | 2026-03-05 18:01:25 |
| Message-ID: | E1vyD0n-002Y55-0O@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix handling of updated tuples in the MERGE statement
This branch missed the IsolationUsesXactSnapshot() check. That led to EPQ on
repeatable read and serializable isolation levels. This commit fixes the
issue and provides a simple isolation check for that. Backpatch through v15
where MERGE statement was introduced.
Reported-by: Tender Wang <tndrwang(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAPpHfdvzZSaNYdj5ac-tYRi6MuuZnYHiUkZ3D-AoY-ny8v%2BS%2Bw%40mail.gmail.com
Author: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Backpatch-through: 15
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/177037341a4414f1089748686af9ce8bd9f8d383
Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 5 +++++
src/test/isolation/expected/merge-update.out | 33 ++++++++++++++++++++++++++++
src/test/isolation/specs/merge-update.spec | 2 ++
3 files changed, 40 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2026-03-05 18:01:39 | pgsql: Fix handling of updated tuples in the MERGE statement |
| Previous Message | Jacob Champion | 2026-03-05 17:34:10 | Re: pgsql: Change default value of default_toast_compression to "lz4", when |