MP066WARNINGFree

warn-autovacuum-disabled

What It Detects

Disabling autovacuum causes table bloat and risks transaction ID wraparound.

Why It's Dangerous

Autovacuum prevents table bloat by reclaiming dead tuples, and prevents transaction ID wraparound — which can freeze the entire database. Disabling autovacuum is occasionally justified for temporary bulk-load staging tables, but is dangerous for any table that serves production traffic.

Bad Example

CREATE TABLE staging_data (id INT)
  WITH (autovacuum_enabled = false);

Good Example

-- Create with autovacuum disabled for bulk load, then re-enable
CREATE TABLE staging_data (id INT)
  WITH (autovacuum_enabled = false);
-- After bulk load:
ALTER TABLE staging_data SET (autovacuum_enabled = true);

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP066: false

Or change its severity:

# .migrationpilotrc.yml
rules:
  MP066:
    severity: warning