]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use "concurrent delete" in serialization error for TM_Deleted cases
authorAmit Langote <amitlan@postgresql.org>
Fri, 1 May 2026 00:56:10 +0000 (09:56 +0900)
committerAmit Langote <amitlan@postgresql.org>
Fri, 1 May 2026 01:00:29 +0000 (10:00 +0900)
commit410013d2a5917ee8978c944e582e323acc9ebdcf
tree17d1977cfb3b90eb8f3a66d507c5bde9437c8e99
parent8d829f5a0203ed4395e2d4d3931cd225a00c1b14
Use "concurrent delete" in serialization error for TM_Deleted cases

In ExecLockRows() and ri_LockPKTuple(), the TM_Deleted code path was
using the same "could not serialize access due to concurrent update"
message as the TM_Updated path.  Use "concurrent delete" instead, since
the tuple was deleted, not updated.  The ExecLockRows() instance was
likely a copy-paste error per Andres; the ri_LockPKTuple() instance
was carried over from the same pattern in commit 2da86c1ef9.

Update affected isolation test expected files accordingly and add
a new test to fk-concurrent-pk-upd.spec with concurrent delete of the
PK row.

The ExecLockRows() change is master-only for lack of user complaints
and to avoid breaking anything that might match on the error text.

Reported-by: Jian He <jian.universality@gmail.com>
Author: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CACJufxEG1JTCq4A1gnNAu-bGAq9Xn=Xkf7kC3TRWFz6iuUOuRA@mail.gmail.com
src/backend/executor/nodeLockRows.c
src/backend/utils/adt/ri_triggers.c
src/test/isolation/expected/fk-concurrent-pk-upd.out
src/test/isolation/expected/fk-partitioned-2.out
src/test/isolation/expected/fk-snapshot-2.out
src/test/isolation/expected/fk-snapshot-3.out
src/test/isolation/specs/fk-concurrent-pk-upd.spec