Repository navigation
Conversation
…tions Sub-partitioned partitions now get the key bottom up, each ADD CONSTRAINT adopting the level below, instead of the build refusing the whole tree. The partitioned-key-sub-partitioned code is retired with the refusal.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Review 1/2 (correctness) of 1677f5f: 1 blocking, 3 non-blocking. Inspected the whole change at CI: only three checks exist at this head (DCO, Semgrep, zizmor), all green. The PostgreSQL matrix has not run, and the reason is finding 1. The design reads correct. The build gives each leaf its key as before, then each sub-partitioned partition deepest first (its
Invariants ( Blocking
Non-blocking
Verified
This review was generated by Claude Code (claude-sonnet-5-5). |
|
🤖 Review 2/2 (OSS adoption and integration) of 1677f5f: 0 blocking, 3 non-blocking. The one blocking finding of this review is in 1/2 (the merge conflict that kept the PostgreSQL matrix from running); the marker below carries the PR-wide count. Read the change from two seats: an operator or contributor who reads Non-blocking
What reads well for adopters
This review was generated by Claude Code (claude-sonnet-5-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Stamping with comments: 1 blocking, 6 non-blocking (see the review comments above). The blocking finding is the merge conflict with main, which kept the PostgreSQL matrix from running; the design itself reads correct.
This stamp was left by Claude Code (claude-sonnet-5-5).
|
🤖 Two blockers on
The full diff shows leaf builds followed by bottom-up adoption, with each adoption checking the recorded constraint and index OIDs on its direct children. Review based on the full GitHub diff, PR discussion and reported checks. Builderbot and inline review threads were unavailable. I did not run tests locally. |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approved by Jash’s AI agent after reviewing 1677f5f. The findings and verification limits in the review comment still apply.
The online
ADD PRIMARY KEY/ADD UNIQUEbuild for a partitioned table now runs on trees whose partitions are themselves partitioned, instead of refusing them.Why
pg-sprite adds a key to a partitioned table online: it builds each partition's unique index concurrently, gives it a constraint, and then adds the parent's constraint, which adopts the partitions' constraints instead of building anything under a blocking lock. Until now that only worked when every partition sat directly under the parent. A table partitioned by year and then by month, a common layout, was refused outright, so its owner had to fall back to PostgreSQL's blocking
ADD CONSTRAINT.What
ADD CONSTRAINTunder the derived name<name>_p<partition OID>, and read back that it adopted each one without building an index.found, and the partitions under it need no step. One with a conflicting key constraint, or a relation under its derived name, is refused before any leaf is touched.adoptedfor a sub-partitioned partition, and the verdict detail counts them.partitioned-key-sub-partitionedrefusal and its code are removed, from the build, its dry-run admission, and the desired-plan admission. The capability row,docs/limitations.md, the design doc, and the SchemaBot integration tables are updated to match.Before / after
The only change is what happens to a tree with a sub-partitioned partition; a tree with only direct leaves runs exactly as before. Take
ALTER TABLE app.events ADD CONSTRAINT events_pkey PRIMARY KEY (id, created_at)on this tree: