Debugging a Slow Postgres Migration: What the Query Plan Told Us
We had a migration that should have taken four minutes. It took forty. The first mistake was looking at CPU. The database was idle. The second mistake was looking at locks - plenty of them, but short.
