PostgreSQL index decision guide
Does this migration add a duplicate PostgreSQL index?
Find leading-prefix overlap between a proposed B-tree index and indexes already present in PostgreSQL.
The problem
A new index can duplicate storage and write cost already paid for another index.
How IndexPilot helps
IndexPilot compares the proposed index shape with visible catalog indexes and reports existing_overlap for human review. It never drops either index automatically.
Try it
$ pipx install indexpilot
$ indexpilot review --migration-file migration.sql --fail-on existing_overlap
$ indexpilot review --migration-file migration.sql --fail-on existing_overlap
- Exact proposed column order
- Existing leading-prefix coverage
- Portable Markdown, JSON, and SARIF reports
Important limit
IndexPilot decides whether an index has enough evidence to benchmark. It does not claim that planner cost equals production latency or that an index is safe to ship.