Diagnostic step 1
Check pg_stat_activity and pg_locks for open transactions that predate the inserts; if safe, ask owners to commit/close or terminate hung sessions.
Generated Oct 24, 2026, 9:21:01 AM
Check pg_stat_activity and pg_locks for open transactions that predate the inserts; if safe, ask owners to commit/close or terminate hung sessions.
Inspect pg_stat_progress_vacuum to see where workers are stuck and use pg_stat_io or iostat to check for IO saturation.
Temporarily throttle insert workers (reduce client concurrency or use traffic shaping) for a maintenance window to let vacuum catch up.
Increase autovacuum_max_workers and reduce autovacuum_vacuum_scale_factor for hot partitions, applied per-partition via ALTER TABLE SET (autovacuum_vacuum_scale_factor = 0.01).
If necessary, run manual VACUUM on cold partitions first and avoid immediate VACUUM FULL on live partitions; coordinate with app teams for low-traffic windows.