PostgreSQL Deadlocks shows deadlock information for a monitored PostgreSQL server. Use it to find recurring transaction conflicts and blocking patterns.
The PostgreSQL Deadlocks page includes the Mini DBA Time Range selector. Use Live for the current deadlock view, or switch to Last Hour, Last 12 Hours, Last Day, Last Week, or Custom to review historical deadlock events. Mini DBA loads and caches the selected historical deadlock dataset for the current console session and server context, so reviewing event detail alongside activity and log evidence stays quick after the range has loaded. Use Back to Live to resume live updates, then choose another historical range when you need a different incident window.
A PostgreSQL deadlock occurs when transactions wait on each other in a cycle and PostgreSQL cancels one transaction so the others can continue. The Deadlocks page helps identify whether deadlocks are isolated events or a repeating application pattern. Recurring deadlocks usually need a code or transaction-ordering fix rather than a server setting change.
Start by grouping events by database, application, user, and statement pattern. If the same tables or statements appear repeatedly, review the application workflow that touches those objects. Transactions that update tables in different orders, hold locks while waiting for user input, or mix long reads with writes are common causes.
Use PostgreSQL Server Log for event detail and PostgreSQL Activity for current blockers. If deadlocks happen during batch processing, compare the event time with scheduled jobs, ETL processes, maintenance tasks, and deployment windows.
Usually no. Timeouts may change how quickly errors appear, but recurring deadlocks normally require transaction design changes.
Cancelling one transaction breaks the cycle so the remaining transactions can continue. The application should handle the error and retry safely where appropriate.
Provide the time, database, statements, application name, objects involved, and any log detail. A reproducible transaction sequence is the most useful evidence.
After reviewing a PostgreSQL deadlock, capture the statements, tables, transaction order, database, application user, and incident time. Compare the same period with Activity and the Server Log. If the pattern repeats, work with developers to shorten transactions, access objects in a consistent order, or add indexes that reduce unnecessary locking.