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: Remove obsolete nbtree insertion comment.
Date: Wed, 15 May 2019 23:54:49 +0000
Message-ID: <E1hR3jV-0005Wz-Vk@gemulon.postgresql.org> (raw)

Remove obsolete nbtree insertion comment.

Remove a Berkeley-era comment above _bt_insertonpg() that admonishes the
reader to grok Lehman and Yao's paper before making any changes.  This
made a certain amount of sense back when _bt_insertonpg() was
responsible for most of the things that are now spread across
_bt_insertonpg(), _bt_findinsertloc(), _bt_insert_parent(), and
_bt_split(), but it doesn't work like that anymore.

I believe that this comment alludes to the need to "couple" or "crab"
buffer locks as we ascend the tree as page splits cascade upwards.  The
nbtree README already explains this in detail, which seems sufficient.
Besides, the changes to page splits made by commit 40dae7ec537 altered
the exact details of how buffer locks are retained during splits; Lehman
and Yao's original algorithm seems to release the lock on the left child
page/buffer slightly earlier than _bt_insertonpg()/_bt_insert_parent()
can.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/489e431ba56b10f5736fb54a045ca40880f11bbc

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 3 ---
1 file changed, 3 deletions(-)



Message-ID: <E1hR3jV-0005Wz-Vk@gemulon.postgresql.org>
Permalink:  ../E1hR3jV-0005Wz-Vk@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hR3jV-0005Wz-Vk@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie
  Subject: Re: pgsql: Remove obsolete nbtree insertion comment.
  In-Reply-To: <E1hR3jV-0005Wz-Vk@gemulon.postgresql.org>
  References: <E1hR3jV-0005Wz-Vk@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