5 min read
auto_explain in Postgres: Catching Bad Plans After They Happen
auto_explain is for the slow plan you cannot reproduce later. It captures the execution plan when the bad thing actually happens.
Notes for the problems that show up after launch: bad plans, awkward migrations, index debt, vacuum pressure, replica lag, and the small decisions that make PostgreSQL easier to operate.
auto_explain is for the slow plan you cannot reproduce later. It captures the execution plan when the bad thing actually happens.
pgbench measures Postgres throughput under a synthetic workload. It tells you something useful, but only if you understand what its numbers mean.
Production migration review is mostly lock review. The SQL can be correct and still dangerous if it rewrites a table, validates too much, or blocks writes.
JSONB columns are great. JSONB indexing has a steeper learning curve than the docs admit. Here is what works in production.