git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f021546) | patch
Fix EvalPlanQual rechecking during MERGE.
2023年9月30日 09:52:21 +0000 (10:52 +0100)
2023年9月30日 09:52:21 +0000 (10:52 +0100)
commit 1d5caec221d85b8950a1ee3d8bb6fad262549ea6
Fix EvalPlanQual rechecking during MERGE.

Under some circumstances, concurrent MERGE operations could lead to
inconsistent results, that varied according the plan chosen. This was
caused by a lack of rowmarks on the source relation, which meant that
EvalPlanQual rechecking was not guaranteed to return the same source
tuples when re-running the join query.

Fix by ensuring that preprocess_rowmarks() sets up PlanRowMarks for
all non-target relations used in MERGE, in the same way that it does
for UPDATE and DELETE.

Per bug #18103. Back-patch to v15, where MERGE was introduced.

Dean Rasheed, reviewed by Richard Guo.

Discussion: https://postgr.es/m/18103-c4386baab8e355e3%40postgresql.org
src/backend/executor/README diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
src/backend/optimizer/plan/planner.c diff | blob | blame | history
src/include/nodes/execnodes.h diff | blob | blame | history
src/include/nodes/plannodes.h diff | blob | blame | history
src/test/isolation/expected/merge-join.out [new file with mode: 0644] blob
src/test/isolation/isolation_schedule diff | blob | blame | history
src/test/isolation/specs/merge-join.spec [new file with mode: 0644] blob
src/test/regress/expected/merge.out diff | blob | blame | history
src/test/regress/expected/with.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /