The SQLNirvana blog
Articles about locks
Tuning, upgrades, vacuum, indexes and security, written for teams that look after their own databases.
MySQL deadlocks: how to read them and how to prevent them
InnoDB resolves deadlocks automatically by rolling one transaction back. Here's how to read the deadlock report and the changes that make them rare.
23 Sep 2026 · 2 min readWho is blocking whom? Finding lock waits in MySQL and PostgreSQL
When queries pile up waiting for each other, here's how to find the session holding the lock, see what it's doing, and decide whether to end it.
20 Sep 2026 · 2 min read