All articles

PostgreSQL

PostgreSQL Autovacuum: The Maintenance Workload You Are Ignoring

Nov 4, 2026 postgresql · autovacuum · bloat · maintenance

Bloat, stale statistics, and mystery slowdowns usually trace back to autovacuum settings written for someone else's workload.

PostgreSQL performance problems are frequently maintenance problems in disguise. The default autovacuum configuration is a compromise written for a workload you do not have. On a write-heavy table it falls behind; bloat grows; every index scan pays a tax; the planner reads stale statistics and picks worse plans.

Per-table autovacuum beats global settings

A hot orders table and a cold reference table do not want the same vacuum cadence. Set scale factors and thresholds per table for the heavy writers; leave defaults for the rest. This one change resolves the majority of "PostgreSQL gets slow over time" reports.

Measure bloat, don't assume it

Bloat estimates vary wildly between tools. Establish a repeatable measurement — dead tuples ratio, table size vs. live rows — and trend it. If autovacuum tuning is your fix, the curve should flatten within days; if it does not, the problem is elsewhere.

Tags

postgresql autovacuum bloat maintenance

Related articles

Work with Burj

Your database deserves engineering, not guesswork.

Tell us what is slow — CPU, queries, migrations, or cost — and we will scope the smallest safe fix.

Plan an engagement