On Thu, 21 Jan 2021 at 13:16, David Rowley <dgrowle...@gmail.com> wrote: > Proposed patch attached.
I ended up pushing a slightly revised version of this which kept the code the same as before when rs_numblocks had not been changed. I backpatched to 9.5 as it seemed low risk and worthy of stopping some head-scratching and a future report for any extension authors that make use of heap_setscanlimits() with backwards scans at some point in the future. David