model-writtenrun 7810 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley discovered incorrect backward-scan starting pages after heap_setscanlimits() while developing backward TID range scans; existing core callers used forward scans, so he found no current core failure #1.
- His patch made heapgettup() and heapgettup_pagemode() calculate the last page of the requested range using rs_numblocks, and also replaced the unrestricted-scan calculation with a modulo expression #1.
- David raised whether to backpatch despite the absence of an affected core caller, since extensions could use backward scans with heap_setscanlimits() #1.
- David committed a revised version that retained the range-limited fix while preserving the existing unrestricted-scan branches 16dfe253e3.
- In the final message, David confirmed the fix was committed and backpatched through PostgreSQL 9.5 because it was low risk and could prevent confusing failures for extension authors; no outstanding work was identified #2.