model-writtenrun 4422 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo proposed allowing anti-join inputs to swap so hash joins could hash the smaller relation #1, and Tom Lane outlined reusing right-join match flags to emit only unmatched hash entries, with merge-join support also possible #3.
- Richard supplied a hash-only proof of concept #4; Emre Hasegeli tested it and reported failures #5, and Ronan Dunklau traced incorrect duplicate output to advancing the outer scan before marking every matching inner tuple #7.
- Richard corrected that execution error and concluded that right-join costing was appropriate because right anti joins cannot stop at the first match #8; Ronan accepted the correction and requested test updates #9 #10, which Richard supplied alongside merge-join support #11.
- Zhihong Yu suggested changing the comment wording from matched to matching #12, but Richard retained the existing anti-join terminology for consistency #13.
- After roughly a year, Richard rebased the series #14; Tom questioned stale comments, empty-input handling, and costing assumptions #15, and Richard explained that right anti joins follow right-join scanning behavior #16 before updating the comments #17.
- Alvaro Herrera's benchmarks showed a smaller runtime improvement than the estimated cost reduction #18, but follow-up comparisons reproduced similar costing and timing for ordinary right joins #19 #20, suggesting a broader estimation issue rather than a new anti-join defect #21.
- Richard refreshed the patch again and declared it ready #23; Tom committed it as 16dc2703c5 after comment edits and adaptation to upstream Parallel Hash Full Join support, reporting that plain execution timings supported the estimates and suggesting EXPLAIN ANALYZE overhead explained the earlier discrepancy #24.
- Post-commit testing by Thomas Munro found that the original example needed a lower parallel-scan threshold to choose Parallel Hash Right Anti Join #25; he traced this to the planner omitting partial paths for the tiny input relation #26.
- Tom cautioned against generating many low-value paths #27, while Richard demonstrated a parallel right anti join test case but agreed that regression coverage could wait for join_hash.sql runtime improvements #28.
- Richard noted worker-count constraints on generating additional partial paths #29, and Thomas explored deferred path creation and rescaling alternatives without settling on an implementation #30.
- Richard then proposed hash-based right semi joins, reporting a substantial benchmark improvement #31, and attached a separate implementation #32; the thread ends with right anti joins committed, parallel-path planning and test coverage still open, and right semi joins newly proposed with merge-join support left out pending evidence of benefit.