]> 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:57:32 +0000 (19:57 +0200)
commit8bfaae6fb20cf3029f42f2760f9d90a84e4448d7
tree07e2b84c25f4c8a1c429431847a520b184c6cd6b
parent87da83bde9f8b57e01e5cd1a7716d9db6696ea27
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