Hi! I wonder why does ExecMergeMatched() determine the lock mode using ExecUpdateLockMode(). Why don't we use lock mode set by table_tuple_update() like ExecUpdate() does? I skim through the MERGE-related threads, but didn't find an answer.
I also noticed that we use ExecUpdateLockMode() even for CMD_DELETE. That ends up by usage of LockTupleNoKeyExclusive for CMD_DELETE, which seems plain wrong for me. The proposed change is attached. ------ Regards, Alexander Korotkov
0001-ExecMergeMatched-lock-mode.patch
Description: Binary data