nbtree: _bt_readnextpage doesn't affect markPos.

Peter Geoghegan <pg@bowt.ie>

Commit: c45a1dba0d85c7a44f29f1841afd877ba4f4c683
Author: Peter Geoghegan <pg@bowt.ie>
Date: 2025-06-13T23:58:47Z
Releases: 18.0
nbtree: _bt_readnextpage doesn't affect markPos.

_bt_readnextpage expects so->currPos.buf to be InvalidBuffer (and for
the position's page to be unlocked) when called.  However, it does not
expect there to be no pins held on any page.  In particular, so->markPos
might hold a separate pin, both before and after the call.  Fix some
comments that seemed to suggest otherwise.

Follow-up commit to commit 7c319f54, which made _bt_killitems drop pins
it acquired itself.

Files

PathChange+/−
src/backend/access/nbtree/nbtsearch.c modified +7 −4