PrefectPostgreSQL

Table bloat exceeds 100% causing significant performance degradation

critical
performanceUpdated Mar 24, 2026
How to detect:

PostgreSQL table bloat exceeds 100%, calculated as the ratio of dead tuples to live tuples. This indicates significant wasted storage and performance impact from dead tuples not reclaimed by autovacuum.

Recommended action:

Run manual VACUUM ANALYZE on affected tables (flow_run, task_run, log). For tables requiring full rebuild, use pg_repack instead of VACUUM FULL to avoid exclusive table locks that block all reads and writes for hours. Check for long-running transactions blocking VACUUM with pg_stat_activity query. Run during low-traffic periods.