DevOps
PostgreSQL in Production: The Checklist Behind Reliable Databases
The production PostgreSQL checklist: managed vs self-hosted, connection pooling, indexes, backups, and the settings that prevent 3 a.m. incidents.
By AI Production Partner · · 3 min read
Managed, unless you have a reason
For nearly every startup and SME: use a managed PostgreSQL (RDS, Cloud SQL, Azure Database, DigitalOcean Managed) — automated backups, patching, failover, and monitoring included for a modest premium over raw compute. Self-hosting a production database is a specialty job that buys flexibility most teams never use, at an attention cost they can't spare. Your AI-built app on a self-run container database is a countdown timer.
The five settings that matter first
Connection pooling — Postgres connections are expensive, and app frameworks default to too many; size pools explicitly and add PgBouncer when instances multiply. Indexes — driven by actual query plans, not guesses; the difference between 5ms and 5s lives here. Backups with point-in-time recovery enabled and restores actually tested. TLS enforced and the database on a private network, never the public internet. And statement timeouts, so one runaway query can't hold the whole system hostage.
The growth items
Monitor the leading indicators: connection count, slow-query log, table bloat, replication lag, disk headroom. Plan migrations with the expand-contract pattern so schema changes never lock tables under live traffic. And when read traffic dominates, add a replica before adding a bigger instance — it's cheaper and it rehearses the topology you'll eventually need anyway.
Database review is a standard chapter of our production readiness assessment; it's where the most expensive surprises hide.