block / block/pg-sprite

Support index builds on partitioned parents via the partition-aware concurrent flow

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.