model-writtenrun 9673 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed locking partitions only when tuple routing first reaches them, reporting a large INSERT speedup with 10,000 partitions and accepting less predictable lock ordering for concurrent partition-level DDL #1.
- Tomas Vondra independently confirmed substantial performance gains and examined partition-descriptor safety, while Sho Kato and John Naylor supplied additional benchmarks; Kato's regression failures disappeared after correcting plan_cache_mode #2 #3 #5 #10.
- John Naylor raised documentation of the changed locking behavior, and David Rowley suggested release notes while explaining that explicitly locking the parent table could protect multi-partition DDL transactions #5 #9.
- David Rowley rebased the patch for table_open() in #12; subsequent testing found smaller gains on John Naylor's machine but unchanged performance on Tomas Vondra's systems, without identifying a patch regression #13 #15 #16.
- Robert Haas supported the performance-versus-deadlock tradeoff, then questioned interactions with other delayed-locking work; David Rowley explained that partition locks were already acquired after planning, and Haas accepted that clarification #19 #21 #22 #23.
- After initially inspecting a similarly titled patch from another thread, Tom Lane reviewed this executor change and questioned its interaction with existing locks; David Rowley explained the INSERT cases and reuse of UPDATE result relations #31 #32.
- Robert Haas and Tom Lane examined parent-before-child locking and concurrent partition changes, ultimately accepting rare deadlock risks for unusual strong-lock combinations; broader concurrent ATTACH/DETACH concerns remained separate work rather than a prerequisite #34 #35 #40 #41.
- Robert Haas found an obsolete comment claiming all partitions were already locked, and Tom Lane requested clearer comments and verification of the lock replacements; Haas checked the remaining sites, and David Rowley supplied the final comment-only revision #38 #41 #42 #43.
- Robert Haas committed #43 with an identical source diff as 9eefba181f, rewriting the commit explanation and crediting David Rowley and the reviewers #45.
- The thread ended with Tomas Vondra welcoming the commit and David Rowley thanking the reviewers, leaving this patch fully landed with no outstanding revision or follow-up fix in the thread #46 #47.