Vacuum Bloat Triage

Diagnose and fix PostgreSQL table and index bloat when dead tuples keep accumulating: measure first with pgstattuple_approx and pg_stat_user_tables (n_dead_tup, last_autovacuum, autovacuum_count), then find what pins the xmin horizon (oldest backend_xmin in pg_stat_activity, replication slots, prepared transactions, hot_standby_feedback replicas) before touching any autovacuum setting, tune per table, reclaim space with pg_repack or REINDEX CONCURRENTLY and re-measure after a full cycle. Use for "the table is ten times bigger than its data", "autovacuum has been running for days", "n_dead_tup keeps growing" or "autovacuum can't keep up". Not for a slow statement (sql-performance), planning a backfill (db-migration), freeze-age emergencies (xid-wraparound-defense) or unused indexes (index-pruning).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit c0f3648fdb

Frequently asked questions

npx get-skill add greenblacked/vacuum-bloat-triage