Commit 489e431b authored by Peter Geoghegan's avatar Peter Geoghegan

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 40dae7ec 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.
parent 8a0f0ad5
...@@ -926,9 +926,6 @@ _bt_stepright(Relation rel, BTInsertState insertstate, BTStack stack) ...@@ -926,9 +926,6 @@ _bt_stepright(Relation rel, BTInsertState insertstate, BTStack stack)
* inserting to a non-leaf page, 'cbuf' is the left-sibling of the page * inserting to a non-leaf page, 'cbuf' is the left-sibling of the page
* we're inserting the downlink for. This function will clear the * we're inserting the downlink for. This function will clear the
* INCOMPLETE_SPLIT flag on it, and release the buffer. * INCOMPLETE_SPLIT flag on it, and release the buffer.
*
* The locking interactions in this code are critical. You should
* grok Lehman and Yao's paper before making any changes.
*---------- *----------
*/ */
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment