A Row Lock Is the Mechanism, and the Writer Queued Behind It Is the Cost
It rests on the lost-update node, because a lock only makes sense once you have watched the interleaving the engine is being asked to prevent. The isolation menu sits beside it rather than beneath it: a level is a policy, and this is one of the mechanisms a level is implemented with, so neither has to come first. It is the pessimistic answer to that interleaving, and it establishes lock cost as a measurable quantity, which the deadlock node and the optimistic-concurrency node both need in order to be more than a preference.
Questions this Concept answers
Why does taking a row lock deliberately at read time make a read-modify-write safe?
J
jeremy
Video
Table Row and Advisory Lock Modes and Their Conflicts in PostgreSQL
PostgreSQL controls concurrent access at three granularities — table-level, row-level, and page-level locks — plus advisory locks, and every named lock mode is semantically identical except for one p…