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…
Date Time Field Value Out Of Range On Load
An INSERT ... SELECT that casts a text column to date stops with 'ERROR: date/time field value out of range: "25/01/2025"' and…
Data Types & CoercionFunction Round Double Precision Does Not Exist
Calling round (or another function) with two arguments on a floating-point value raises 'function round(double precision, integer) does not exist', with…
Data Types & CoercionValue Too Long For Character Varying On Narrowing
A column narrowing (ALTER ... TYPE varchar(n) or char(n)), an INSERT/UPDATE, or a load into a width-limited column fails with SQLSTATE 22001…
Data Types & CoercionInvalid Input Syntax For Type Integer On Load
An ETL/import step, a column type change (ALTER ... TYPE integer USING ...), or an ad-hoc INSERT ... SELECT that casts text…
Data Types & CoercionInteger Out Of Range Arithmetic Overflow
An UPDATE, INSERT, SELECT, or aggregate that multiplies (or adds) integer values fails with SQLSTATE 22003 and 'integer out of range'. The…
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.