pgsql: nbtree: _bt_readnextpage doesn't affect markPos. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: nbtree: _bt_readnextpage doesn't affect markPos.
Date
Msg-id E1uQEJX-001XXs-0R@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c45a1dba0d85c7a44f29f1841afd877ba4f4c683

Modified Files
--------------
src/backend/access/nbtree/nbtsearch.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: pgsql: Comment fixups from 626df47ad9.
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Keep WAL segments by slot's last saved restart LSN