Core conceptsintermediate

Row-level lock

A lock taken on individual tuples (for example by UPDATE or SELECT ... FOR UPDATE) so concurrent writers coordinate without blocking readers.

What this means

A lock on a single row instead of the whole table. When a transaction updates a row (or reserves it with SELECT ... FOR UPDATE), it locks just that row, so other writers touching different rows carry on freely, and plain readers aren't blocked at all.

Why it matters operationally

Row locks are where most application-level contention lives; how you order and hold them decides whether you deadlock.

Related errors

Where it lives in the source

src/backend/access/heap/heapam.c

← All glossary terms · GUC reference · Error catalog