Posts about locking
Articles, guides and engineering notes about locking from the Relyt One team.
2 articles

Postgres "idle in transaction": how one forgotten COMMIT blocks VACUUM and migrations, and the timeouts that fix it
What idle in transaction means in pg_stat_activity, which of those sessions actually stop VACUUM (and which don't), how they block row updates and ALTER TABLE, how to find and kill them, and how idle_in_transaction_session_timeout and PostgreSQL 17's new transaction_timeout end them for you. Every example replayed on Postgres 17.11.

Postgres "deadlock detected": how to read the error, reproduce it, and fix the four patterns behind it
What ERROR: deadlock detected (SQLSTATE 40P01) means in PostgreSQL, how to read the DETAIL and CONTEXT lines, and how to fix the four common deadlock patterns: rows updated in opposite order, unique keys inserted in opposite order, FOR SHARE followed by UPDATE, and SELECT FOR UPDATE on a parent row after inserting children. Every example reproduced with two sessions on Postgres 17.11.