Dev.to
7/25/2026

The original title is "Running Postgres at Scale: Lessons Learned" - it has a colon which I need to remove. Let me rewrite it.
Original: Running Postgres at Scale: Lessons Learned
Short summary
A battle-tested Postgres operator shares hard-won lessons from running Postgres at millions-of-users scale. Key themes: tune autovacuum early (scale_factor 0.05 on big tables), pool connections with PgBouncer instead of letting apps open hundreds of direct connections, and alert on long-running transactions that block vacuum and cause table bloat. The author also stresses practicing restores on real data volumes monthly — their first 800GB restore took 11 hours, a fact worth knowing before an outage.
- •Tune autovacuum early; dead tuples silently degrade query performance
- •Use PgBouncer for connection pooling — Postgres handles ~50 pooled connections better than 500 direct ones
- •Alert on transactions older than 10 minutes; they block vacuum and cause bloat
- •Practice restores monthly on real data volume before you need them
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



