From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: nbtree: _bt_readnextpage doesn't affect markPos.
Date: Sat, 14 Jun 2025 00:00:03 +0000
Message-ID: <E1uQEJX-001XXs-0R@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: nbtree: _bt_readnextpage doesn't affect markPos.
In-Reply-To: <E1uQEJX-001XXs-0R@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox