MP093WARNINGFree

warn-default-partition-growth

What It Detects

A DEFAULT partition silently absorbs rows that belong to missing partitions, making later ATTACH operations expensive.

Why It's Dangerous

A default partition converts a loud failure into a silent one. Without it, inserting a row that matches no partition raises an error somebody notices the same day; with it, the row lands in the catch-all and nothing is logged. Miss a month of partition creation and the default partition quietly becomes the largest table in the database — and getting out is expensive in proportion to how long it went unnoticed, because attaching the partition those rows belong to scans the whole default partition under ACCESS EXCLUSIVE.

Bad Example

CREATE TABLE events_default PARTITION OF events DEFAULT;
-- Silently absorbs every row with no home, forever

Good Example

-- Create partitions ahead of time so a gap fails loudly instead of silently
CREATE TABLE events_2026_01 PARTITION OF events
  FOR VALUES FROM ('2026-01-01') TO ('2026-02-01');
CREATE TABLE events_2026_02 PARTITION OF events
  FOR VALUES FROM ('2026-02-01') TO ('2026-03-01');

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP093: false

Or change its severity:

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