model-writtenrun 4522 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yajun Hu reported a reproducible assertion failure when prepared queries raced with DETACH CONCURRENTLY and reattachment, showing that execution could see fewer partitions than planning; David Rowley brought Alvaro Herrera into the investigation #1 #2.
- Alvaro initially suspected prepared-plan invalidation, while Tender Wang supplied a debugger-controlled reproduction and explained how invalidation between planning and executor initialization produced inconsistent partition counts #4 #5 #7 #8.
- Tender proposed handling detached partitions explicitly and identified a contradictory executor comment; Alvaro then recognized that planner and executor use separate partition directories and posted a first fix that also retried descriptor construction after encountering a missing relpartbound #6 #9.
- Tender successfully tested the initial patches, but Alvaro's expanded workload demonstrated that an attachment and detachment could preserve the partition count while changing the OIDs, requiring array comparison rather than count comparison; a generation counter was deferred because it was not suitable for backpatching #10 #11.
- Alvaro split descriptor construction and executor pruning into independent patches, introduced the OID-array comparison, and omitted the earlier separate comment correction; Tender reported that both patches passed his tests #12 #13.
- The descriptor-retry component of #12 landed as 5dcaefc6a0, with explanatory comment edits, while the executor fix remained under development.
- Alvaro discovered that the executor mapping incorrectly assumed numeric OID order and rewrote the remaining patch to use bounded lookahead in partition-bound order, testing with partitions deliberately created out of OID order; Tender reviewed that revision positively #14 #15 #16.
- Further concurrency testing exposed flaws in the lookahead bound, so Alvaro simplified the algorithm to search the remaining entries; Tender reviewed the final algorithm and considered it correct #17 #18.
- The final pruning patch from #17 landed as 66e569f502, with a redundant bounds check added, and Alvaro announced the push #19.
- Tom Lane pointed out the beta release freeze, and Alvaro announced a revert on the frozen branch, also noting an unexplained buildfarm timeout; b0ea16528c implemented that discussion-driven reversal while the stable-branch fixes were retained #20 #21.
- Tom subsequently explained that the timeout had occurred intermittently before and suggested leaving the fix in place, but the revert had already been committed #22 b0ea16528c.
- The pruning fix from #17 landed again as dbca3469eb, retaining the redundant bounds check added at the first landing; Alvaro subsequently announced the renewed push and an additional comment correction, leaving no patch awaiting review in this thread #23.