model-writtenrun 4267 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zuming Jiang reported that simplifying a CASE expression changed a query's result from zero rows to one row on PostgreSQL 16beta1, supplying a reproducible test case in #1.
- Tom Lane traced the missing rows to reuse of a hash table after parameters in its inner hash keys changed, and proposed an executor-side check with regression tests in #2.
- Tom Lane also questioned whether the planner should already track those dependencies in #2, then confirmed that finalize_plan() ignored Hash.hashkeys and replaced the workaround with a planner fix while retaining the tests in #3.
- The thread ends with the revised patch in #3, which subsequently landed unchanged apart from branch context in the supplied candidates 9529b1eb1b and 45392626c9; these represent the same change, and no independent patch review appears in the thread.
- The commit message for 9529b1eb1b records backpatching through PostgreSQL 12 and leaving PostgreSQL 11 unfixed because its older plan representation would require a substantially different fix in a nearly end-of-life branch.