Support index builds on partitioned parents via the partition-aware concurrent flow
- Dominant language
- Go
- Stars
- 7
- Forks
- 1
- Avg merge
- 18h 2m
- Merged PRs (30d)
- 74
Description
pg-sprite currently refuses any plan that builds an index on a partitioned parent (see [docs/limitations.md](https://github.com/block/pg-sprite/blob/main/docs/limitations.md)): PostgreSQL cannot run `CREATE INDEX CONCURRENTLY` at the parent level, and pg-sprite refuses the blocking form by policy because it takes `ACCESS EXCLUSIVE`.
The safe flow exists and is planned: `CREATE INDEX ON ONLY parent` → per-partition `CREATE INDEX CONCURRENTLY` → `ALTER INDEX ... ATTACH PARTITION`, with crash-resume across the per-partition builds and a final validity check on the parent index. This issue tracks building that flow.
Until it lands, the engine refuses with typed causes `parent-concurrent-index-build` / `parent-blocking-index-build` rather than failing mid-change.
Contributor guide
Research direction
Start with docs/limitations.md and the current handling of partitioned-parent index plans. Trace the existing concurrent index-build flow and determine how the parent-only index, per-partition builds, attachment steps, crash resume, and final validity check fit together. Done means partitioned-parent builds follow the safe flow without the current typed refusal causes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100