MP092WARNINGFree
require-partitioned-index-strategy
What It Detects
CREATE INDEX on a partitioned parent cannot use CONCURRENTLY and recursively locks every partition.
Why It's Dangerous
CONCURRENTLY is simply not available on a partitioned parent — PostgreSQL answers "cannot create index on partitioned table concurrently" and the migration fails at run time, after it has started. Drop the CONCURRENTLY and it is accepted, which is the trap: one statement then builds an index on every partition, holding locks across the whole hierarchy until the last one completes, with no way to stop partway or observe progress. CREATE INDEX ON ONLY parent creates a catalog entry with no storage, which each partition then fills in one at a time.
Bad Example
CREATE TABLE events (id BIGINT, ts TIMESTAMPTZ) PARTITION BY RANGE (ts); CREATE INDEX idx_events_id ON events (id); -- Accepted, but builds on every partition inside one lock window
Good Example
CREATE TABLE events (id BIGINT, ts TIMESTAMPTZ) PARTITION BY RANGE (ts); -- Catalog-only parent index: instant, marked invalid until filled in CREATE INDEX idx_events_id ON ONLY events (id); -- One partition at a time, each build online CREATE INDEX CONCURRENTLY idx_events_id_2026_01 ON events_2026_01 (id); ALTER INDEX idx_events_id ATTACH PARTITION idx_events_id_2026_01;
Configuration
Disable this rule:
# .migrationpilotrc.yml rules: MP092: false
Or change its severity:
# .migrationpilotrc.yml
rules:
MP092:
severity: warning