Table bloat consuming excessive disk space
warningstorageUpdated Dec 17, 2024
Technologies:
How to detect:
Dead tuples accumulate in tables when bloat_size (pg_relation_size - space needed for live+dead tuples) exceeds zero, wasting disk space and degrading performance
Recommended action:
Detect bloat using pg_stat_user_tables and pg_class to calculate bloat_size. Run VACUUM ANALYZE regularly for maintenance. For severe bloat on specific tables, use VACUUM FULL (note: requires table lock). Prevent with proper autovacuum configuration.