PostgreSQL · Concept
Deadlocks
A deadlock happens when transactions wait for locks held by each other. PostgreSQL detects the cycle, aborts one transaction, and lets the others proceed.
Last updated
Syntax
LOCK [ TABLE ] [ ONLY ] name [ * ] [ [ AS ] alias ] [ lockmode ] [ NOWAIT ]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
deadlock_timeoutlog_lock_waitsLOCKpg_locksrow-level lockstable-level locksadvisory locks