nbtree: _bt_readnextpage doesn't affect markPos.
authorPeter Geoghegan
Fri, 13 Jun 2025 23:58:47 +0000 (19:58 -0400)
committerPeter Geoghegan
Fri, 13 Jun 2025 23:58:47 +0000 (19:58 -0400)
commitc45a1dba0d85c7a44f29f1841afd877ba4f4c683
treef709ee846888e09b4044cd0384cd67b4c5181f5a
parenta0c7b765372d949cec54960dafcaadbc04b3204e
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.
src/backend/access/nbtree/nbtsearch.c