Troubleshooting
PostgreSQL deadlock detected
Two or more transactions locked each other causing an abort.
SQL Lens
Run this query locally to surface offenders.
SELECT timestamp, message FROM logs WHERE message ILIKE '%deadlock%' ORDER BY timestamp DESCInvestigate in HUDPlaybook
- Capture pg_locks output around the timestamp for blocking chains.
- Add explicit ordering to conflicting DML statements.
- Shorten transaction scope or reduce isolation level to READ COMMITTED.