model-writtenrun 9364 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Feike Steenbergen reported excessive planning memory consumption and unresponsiveness with FULL OUTER JOINs over thousands of partitions, providing a reproducer and noting failures across several PostgreSQL releases #1.
- Tom Lane traced the explosion to add_child_rel_equivalences() repeatedly transforming previously generated child expressions, producing useless combinations across partitioned relations; he explained that other join expressions could trigger the same problem #2.
- Tom's patch restricted expansion to original equivalence-class members and used topmost-parent references with multilevel attribute translation for indirect descendants; he reported that it fixed the reproducer and passed check-world, while deferring a broader rewrite of the translation machinery #2.
- Tom committed the attached patch unchanged as d25ea01275, following his stated decision to fix the development branch without risking backpatches for partition counts poorly supported by older releases #2.
- After the commit, Feike confirmed drastically improved three-way joins and a working four-way join, closing the thread with successful testing and no further patch revision #3.