Skip to content

Glossary: PostgreSQL Beyond the Basics

Deadlock

Also written: deadlock_timeout, deadlock detected

Two transactions each waiting for a lock the other holds. After `deadlock_timeout` (1 second), Postgres cancels one so the other can continue. Retry the cancelled one, and lock rows in a fixed order to avoid it.

Where the book teaches it

Related terms

Lock modes, lock queueSerialization failure