SQLNirvana by Pyro

The SQLNirvana blog

Articles about locks

Tuning, upgrades, vacuum, indexes and security, written for teams that look after their own databases.

Allmysql 10postgresql 9upgrade 3indexes 2locks 2tuning 2vacuum 2aws 1queries 1schema 1security 1
mysqllocks

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 read
mysqlpostgresqllocks

Who 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

RSS feed