PostgreSQL

Dead tuples exceed threshold causing table and index bloat

warning
storageUpdated Mar 4, 2026
Technologies:
How to detect:

Dead tuples accumulate when autovacuum cannot keep pace with UPDATE and DELETE operations, leading to table and index bloat, slower queries, and excessive disk usage

Recommended action:

Query pg_stat_user_tables to identify tables with high n_dead_tup counts. Check top 10 tables with 'SELECT relname AS table, n_dead_tup AS dead_rows FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 10;'. For affected tables, tune autovacuum thresholds using ALTER TABLE or manually VACUUM during low-traffic periods.