model-writtenrun 4602 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby opened this thread with a proposal to create invalid catalog entries throughout a partition hierarchy and then build the indexes through concurrent reindexing, leaving interrupted builds recoverable with DROP or REINDEX #1.
- After an initial rebase, Justin expanded the series with experimental refactoring to process multiple index partitions together #2 #4.
- Anastasia Lubennikova questioned progress counting, identified access to a closed relation, and requested clearer helper naming and failure documentation; Justin addressed several points, while Zhihong Yu identified further cleanup issues in the experimental refactoring #5 #7 #8.
- Justin subsequently omitted the two bulk-reindex refactoring patches, retaining the core feature, progress reporting, SKIPVALID integration, and parent validation #9.
- After nearly a year without updates, Alexander Pyhalov revived the series, fixed relation-lifetime problems exposed by RELCACHE_FORCE_RELEASE, documented partial failures, and introduced explicit progress-reporting control for the reindex-based implementation #10.
- Alexander then fixed intermediate partitioned indexes remaining invalid and added tests; Justin later invited him to take over the work, which Alexander accepted before rebasing the series #11 #14 #15 #16.
- Justin eventually integrated Alexander's fixes into one patch, and Alexander reported successful testing while questioning progress accounting for already-valid indexes #17 #18.
- Ilya Gladyshev supplied a progress-reporting fix and identified a deeper usability problem: failed builds could leave replacement indexes with _ccnew names that dropping the parent index would not remove #19.
- Justin responded by replacing concurrent reindexing with an extracted DefineIndexConcurrentInternal() helper, preserving per-index build phases while eliminating the replacement-index behavior #20.
- Ilya's testing found an extra parent-index progress count, and Justin revised progress handling and collected intermediate indexes for final validation; Alexander's naming review then led to the tosetvalid rename #21 #22 #23 #24.
- Alexander questioned premature lock release and parent locking, then fixed use of the parent relation instead of the child when constructing lock identifiers, leaving concurrent partition removal and deadlock behavior unresolved #25 #26.
- Ilya revived the patch in May 2024 with session locks acquired for all partitions before building any leaf and a weaker inheritance lock; Alexander's review also prompted clearer documentation of manual partition indexing #27 #28 #29 #30.
- Ilya subsequently abandoned locking every partition for the entire operation, instead locking partitions as needed and skipping dropped relations, and added a separate fix for partitioned-REINDEX progress reporting #31.
- At Justin's request, Ilya added isolation tests covering concurrent partition drops and detachments, fixing additional relation-check ordering problems uncovered by those tests #32 #33.
- Discussion established that the REINDEX progress defect also affected the development branch independently of this feature, so Michael Paquier requested a separate thread and Ilya moved that patch out while resending the feature unchanged #34 #35 #36 #37.
- After another long gap, Alexander fixed an active-snapshot underflow for partitioned tables without leaves and added an event-trigger regression test #40.
- The last supplied message fixes loss of the concurrent flag when constructing child statements; the full concurrent-index feature remained a submitted patch with no feature landing shown in the supplied thread #41.
- The later candidate commit by Álvaro Herrera extracts only Justin's unchanged index-state cleanup from the latest submission, replacing manual catalog updates with index_set_state_flags() and crediting Alexander's review; the concurrent-build feature and its tests are excluded #41 2b4b768537.