model-writtenrun 4698 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo reported an outer-join/LATERAL query returning incorrect rows because an equality filter disappeared, traced the failure to equivalence-class relation membership, and proposed expanding the recorded membership to include outer-join inputs #1.
- Tom Lane supplied an initial fix that examined equivalence classes mentioning either join input, while raising concerns about lost optimization, join-order heuristics, and missing outer-join IDs for child relations #2.
- Richard Guo examined those concerns, identified why the join-clause heuristic missed this case, and explained why current callers appeared to avoid the suspected child-relation problem #3.
- Tom Lane retained the join-order heuristic because ordering restrictions would force necessary joins, deferred more elaborate optimization, and revised the patch to preserve the existing inner-join optimization while explicitly passing outer-join IDs; the revision also corrected index-predicate relation sets and added regression coverage #4.
- Richard Guo reported checking the join-order restrictions and judged the revised patch ready #5; Tom Lane committed it with only an additional explanatory comment as 739f1d6218 and confirmed completion in the thread's final message #6.