model-writtenrun 8365 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- 李杰(慎追), signing as Adger, opened the discussion because manually creating indexes on every partition before creating the parent index was cumbersome, and asked what prevented direct concurrent creation on partitioned tables #1.
- Justin Pryzby proposed recursively creating child indexes and investigating error handling #2, then supplied a prototype that closed relations before recursive transaction boundaries and enabled concurrent creation on the parent #3.
- Justin expanded the work into concurrent index creation, REINDEX, and CLUSTER for partitioned tables, adding tests and registering the series for review #4.
- Michael Paquier requested tests covering multiple partitioning levels, empty intermediate partitions, leaf operations, relfilenode changes, and intact partition trees #5, while Adger reproduced a PopActiveSnapshot crash and questioned what should survive a failed child-index build #6 #7.
- Justin revised the series with longer-lived metadata, snapshot restoration after recursive concurrent builds, and broader partition tests, although his accompanying rollback explanation used a non-concurrent CREATE INDEX example #8.
- Adger demonstrated that a duplicate-key failure could leave a valid index on an earlier partition, an invalid parent or child index, and later partitions without indexes, challenging the recursive operation's failure semantics #9.
- Michael proposed creating all index catalog entries together, then coordinating build and validation phases across the tree #10; after Adger raised scalability concerns #11, Michael identified the existing per-parent readiness and validity transitions as needing further design work and suggested REINDEX could reuse existing multi-index machinery #12.
- Adger compared coordinated phases with per-partition progress and questioned whether delaying validation across many partitions would accumulate excessive missing entries #13 #14; Michael explained that REINDEX could build and validate separately while grouping swaps to preserve index-tree consistency #15.
- At the thread's end, Adger refined an alternative that registered all indexes first and then built and validated each partition in separate transactions, preserving successful earlier work after failure; the choice remained unanswered, with no further patchset or landing announcement in the supplied discussion #16 #17.
- The REINDEX portion of #8 subsequently landed in September 2020 as a6642b3ae0, substantially reworked by co-author Michael Paquier to share multi-relation processing, handle each physical partition separately, support concurrent execution, and test concurrent drops and foreign partitions.
- CLUSTER continued in thread #43155, whose later source #503762 superseded this thread's prototype before the April 2022 landing cfdd03f45e; that version requires an explicit partitioned index and leaves partitioned indexes unmarked as clustered, while neither candidate implements the original concurrent CREATE INDEX proposal.