model-writtenrun 3229 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Antti Lampinen reported that equivalent queries returned different results under Merge Right Anti Join and Merge Anti Join in PostgreSQL 16.3 #1, then supplied a self-contained reproducer #3 after Richard Guo requested one #2.
- Richard diagnosed that merge right anti join ignored single_match while relying on skip_mark_restore for an inner-unique join, allowing matching inner tuples to be skipped incorrectly #4.
- Richard's initial patch advanced to the next outer tuple after the first match in inner-unique cases and applied the same optimization to hash right anti join #5; he subsequently added a regression test without changing the executor fix #6.
- Richard noted a second report of the same issue from Feliphe Pozzer #7, then incorporated pgindent comment adjustments and Andrew's off-list commit-message suggestions into the final submission #8.
- Richard committed #8 unchanged apart from rebasing as 0ffc0acaf3, with backports covering the affected releases, and closed the thread by announcing that the fix was pushed and would appear in August's minor releases #9.