model-writtenrun 2857 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Geoghegan reported incorrect results from scrollable cursors using nbtree array keys on PostgreSQL 17 and master, supplying a reproducer and proposed fix #1.
- The failure required reversing direction after scheduling a primitive scan on the first page of the top-level scan, before fetching another tuple could execute that scheduled scan #1.
- Peter proposed cancelling the pending primitive scan in _bt_steppage when the direction changes, while allowing subsequent page processing to adjust the array keys #1.
- Peter committed the fix with additional direction-state initialization changes, assertion adjustments, and explanatory comments; the commit specifies backpatching to PostgreSQL 17 c177726ae4.
- The supplied thread ends with the original proposal and contains no review replies or further submissions; the candidate commit establishes that the fix subsequently landed #1 c177726ae4.