All rules Rule BV038
note
hosted, paid — --remote

Autovacuum disabled — bloat and wraparound left to accumulate

Note — this works and blocks nothing, but a performance regression is likely.

What it catches

With autovacuum_enabled = false, dead tuples accumulate unchecked (bloat, degrading scans) and the table still gets aggressive wraparound vacuums eventually — at the worst possible moment. Tuning autovacuum beats disabling it in almost every case.

Fires on

ALTER TABLE orders SET (autovacuum_enabled = false);

Do this instead

Tune autovacuum per table instead of disabling it: a lower scale factor and cost delay make it run more often and gentler. Wraparound vacuums will come regardless — the only choice is whether routine vacuums kept the table small first.

SET lock_timeout = '5s';
ALTER TABLE orders SET (
  autovacuum_vacuum_scale_factor = 0.05,
  autovacuum_vacuum_cost_delay = 2
);
Catch this before it ships

This rule runs in the hosted service on Startup and above — add --remote with a team token, or use the GitHub Action: npx bolvrk check migration.sql