pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix nbtree backward scan race condition comments.
Date: Fri, 08 Dec 2023 23:38:09 +0000
Message-ID: <E1rBkQ5-009GsF-3N@gemulon.postgresql.org> (raw)

Fix nbtree backward scan race condition comments.

Remove comments that supposed that holding a pin was a useful interlock
for _bt_walk_left().  There are times when _bt_walk_left() doesn't hold
either a lock or a pin on any page, so clearly this can't be true.
_bt_walk_left() is even prepared to deal with concurrent deletion of
both the original page and any pages to its left.

Oversight in commit 2ed5b87f96.

Branch
------
master

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

Modified Files
--------------
src/backend/access/nbtree/nbtsearch.c | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)



Message-ID: <E1rBkQ5-009GsF-3N@gemulon.postgresql.org>
Permalink:  ../E1rBkQ5-009GsF-3N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rBkQ5-009GsF-3N@gemulon.postgresql.org

 · 

reply

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: Fix nbtree backward scan race condition comments.
  In-Reply-To: <E1rBkQ5-009GsF-3N@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