model-writtenrun 174 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo reported a five-relation query that failed from PostgreSQL 14 through master and proposed extending join_is_legal() to follow lateral dependencies, preventing impossible joins from suppressing necessary clauseless joins #1.
- Tender Wang traced and supported the initial fix, then found that replacing the second left join with a full join still caused planning to fail #3 #4.
- Tender Wang identified the full join's composite input as the missing dependency and supplied an inline fix that scanned joinrel entries in root->initial_rels alongside the existing base-relation scan #5.
- Richard Guo generalized that proposal into a single scan of root->initial_rels covering both base and composite inputs, and added regression tests for full joins and sub-joinlists created by collapse limits #6.
- The revised patch landed unchanged as b84ad0cd90, and Richard Guo closed the thread by confirming that it had been pushed and backpatched to all supported branches #7.