model-writtenrun 3031 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Pyhalov reported that merge/hash join planning could select clauses whose missing commutators later caused plan creation to fail, and supplied a path-level check with a reproducer in #1.
- Richard Guo reproduced the failure but questioned whether incomplete operator classes warranted support in #2; Tom Lane argued in #3 that a low-cost fix would be consistent with other planner safeguards.
- Richard Guo reworked the fix to reject unusable clauses during merge/hash clause selection in #4; Alexander Pyhalov confirmed that it worked for his test cases in #5, and Richard refined comments and the commit message in #6.
- Tom Lane endorsed the approach while requesting checked OpExpr casts and cheaper tests using existing operators in #7; Richard incorporated both suggestions in #8, moving the regression cases to equivclass.sql.
- After intervening changes broke the hash test, Richard added the necessary hash operator-family entries and support function in #9, while questioning whether the regression test was worth retaining.
- Richard committed #9 unchanged as 4f1124548f, retaining the tests because their cost was small and declining backpatching because the failure required an incomplete operator class, as explained in #10.
- The original fix had landed, but Alexander Lakhin reported a related longstanding failure in #11: adding a commutator to the test operator caused an operator-family membership error during merge-join initialization; the supplied thread ends without a resolution to that report.