The PostgreSQL Cookbook
Full-incident runbooks for the failures single error pages can't cover — replication lag, autovacuum bloat, lock storms, failovers. Each one a complete diagnose → fix → verify playbook.
★ Recently added
PostgreSQL Crash Due to OOM Kill
⚠️ Symptoms All active connections drop simultaneously with no individual query error — clients see disconnect errors (connection reset, FATAL:…
Advisory Lock Leakage — Dangling Locks
⚠️ Symptoms One or more application threads hang at the point where they call pg_advisory_lock — not on a database…
Unused Indexes Consuming Space
Disk usage on a table is far larger than the data warrants; write throughput is lower than expected on a…
Division By Zero In Rate Calculation
A previously reliable rate/ratio query or UPDATE suddenly fails with 22012 division_by_zero. The failure is all-or-nothing: because one statement computes…
Queries & ComputationSubquery Returned More Than One Row
A SELECT, UPDATE, or INSERT that embeds a scalar subquery -- (SELECT ...) used where one value is expected, such as a…
Read any recipe free. Unlock the executed proof with Pro.
Every recipe gives you the diagnose-fix-verify arc for free. Pro adds the executed verification, catalog audits, and the cloud-provider notes for RDS, Azure & Cloud SQL.
- ✓ The full verification step for every recipe — executed, not described.
- ✓ Catalog & log queries that surface every at-risk object up front.
- ✓ Cross-version gotchas across PostgreSQL 14–18.
- ✓ Exactly where each symptom surfaces on managed Postgres.