recall

← recall

pessimistic concurrency control term

lock the row before reading; nobody else can modify until you commit

Take a row-level lock at the start of the transaction; other writers wait. Simple correctness model — no retries needed — at the cost of throughput when contention is high. Implemented as SELECT FOR UPDATE in SQL DBs. Compare optimistic concurrency control.

aliases: PCC, pessimistic locking, SELECT FOR UPDATE

topics: databases, concurrency

references: