]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix handling of updated tuples in the MERGE statement
authorAlexander Korotkov <akorotkov@postgresql.org>
Thu, 5 Mar 2026 17:47:20 +0000 (19:47 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Thu, 5 Mar 2026 17:56:42 +0000 (19:56 +0200)
commit2dcac93c00655cc62e8105dc12b6cd302d2c0625
tree26279d144ef191fc82a6515eb3152cb6b803ed49
parent28239b761d20774b7d1a66616482b84db9baaafb
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@gmail.com>
Discussion: https://postgr.es/m/CAPpHfdvzZSaNYdj5ac-tYRi6MuuZnYHiUkZ3D-AoY-ny8v%2BS%2Bw%40mail.gmail.com
Author: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Backpatch-through: 15
src/backend/executor/nodeModifyTable.c
src/test/isolation/expected/merge-update.out
src/test/isolation/specs/merge-update.spec