model-writtenrun 9763 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Sanyo Moura reported roughly 15 seconds of planning for a query over hundreds of partitions in #1; Justin Pryzby's reproduction and Sanyo's clarification established that the regression affected PostgreSQL 11 generally, while the apparently faster 11.0 test had used fewer partitions #8 #10 #11.
- Sanyo reduced planning time from 15 seconds to 150 milliseconds by nesting daily partitions under years and months, providing a workaround while investigation continued #17.
- Justin's profiling and Alvaro Herrera's investigation traced the slowdown to add_child_rel_equivalences() and bms_overlap(), with nearly a million members in one equivalence class for about a thousand partitions #8 #19.
- Amit Langote proposed deferring dummy-child EC members until partitionwise joins actually needed them, reducing the reproduced query's planning time to about 513 milliseconds #21; he also traced the apparent pruning bug to a date typo, which Alvaro confirmed #23 #25.
- Ashutosh Bapat explained why nullable outer-join children still need EC members and found that Amit's patch could recreate those members for every join involving the same relation #27 #28.
- After the December gap, Etsuro Fujita revised Amit's patch to use consider_partitionwise_join as an initialization guard and defer targetlist generation too #30; Amit and Etsuro measured planning times of approximately 552 and 254 milliseconds respectively #31 #32.
- Ashutosh proposed avoiding parent-to-child expression translation more broadly, but Amit and Etsuro agreed that this larger planner redesign belonged in future work rather than the backpatchable regression fix #33 #34 #35.
- Amit separately proposed initializing consider_partitionwise_join in build_simple_rel() #36, but discussion exposed UNION ALL and partition-pruning considerations, and the change was left separate from the fix #38 #41.
- Etsuro documented the flag's additional role in the main patch #40, then incorporated Amit's clearer wording and rebased the final submission #43 #49; Ashutosh's alternative involving shared partition-scheme counts was also treated as a separate design issue #44 #48.
- Etsuro committed #49 as 8d8dcead12 with unchanged code and an expanded commit message based on Justin's off-list feedback and self-review #51, then confirmed the PostgreSQL 11 backpatch in the final message #53, completing the regression fix while leaving the broader planner proposals outside this change.