pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix handling of updated tuples in the MERGE statement
5+ messages / 1 participants
[nested] [flat]

* pgsql: Fix handling of updated tuples in the MERGE statement
@ 2026-03-05 18:01 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alexander Korotkov @ 2026-03-05 18:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

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(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix handling of updated tuples in the MERGE statement
@ 2026-03-05 18:01 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alexander Korotkov @ 2026-03-05 18:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/13fab378e630f73b7bb821a211f10b66bc696525

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(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix handling of updated tuples in the MERGE statement
@ 2026-03-05 18:02 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alexander Korotkov @ 2026-03-05 18:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2dcac93c00655cc62e8105dc12b6cd302d2c0625

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(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix handling of updated tuples in the MERGE statement
@ 2026-03-05 18:07 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alexander Korotkov @ 2026-03-05 18:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8bfaae6fb20cf3029f42f2760f9d90a84e4448d7

Modified Files
--------------
src/backend/executor/nodeModifyTable.c       |  5 +++++
src/test/isolation/expected/merge-update.out | 25 +++++++++++++++++++++++++
src/test/isolation/specs/merge-update.spec   |  2 ++
3 files changed, 32 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix handling of updated tuples in the MERGE statement
@ 2026-03-05 18:08 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alexander Korotkov @ 2026-03-05 18:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f6e63d4b8b2ec5ff011c87f79f3efc8abe921263

Modified Files
--------------
src/backend/executor/nodeModifyTable.c       |  5 +++++
src/test/isolation/expected/merge-update.out | 25 +++++++++++++++++++++++++
src/test/isolation/specs/merge-update.spec   |  2 ++
3 files changed, 32 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-03-05 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-05 18:01 pgsql: Fix handling of updated tuples in the MERGE statement Alexander Korotkov <akorotkov@postgresql.org>
2026-03-05 18:01 pgsql: Fix handling of updated tuples in the MERGE statement Alexander Korotkov <akorotkov@postgresql.org>
2026-03-05 18:02 pgsql: Fix handling of updated tuples in the MERGE statement Alexander Korotkov <akorotkov@postgresql.org>
2026-03-05 18:07 pgsql: Fix handling of updated tuples in the MERGE statement Alexander Korotkov <akorotkov@postgresql.org>
2026-03-05 18:08 pgsql: Fix handling of updated tuples in the MERGE statement Alexander Korotkov <akorotkov@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox