pgsql: Correct obsolete nbtree page split comment.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Correct obsolete nbtree page split comment.
Date: 2019-03-12 23:44:36
Message-ID: E1h3r4W-0005cA-8L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Correct obsolete nbtree page split comment.

Commit 40dae7ec537, which made the nbtree page split algorithm more
robust, made _bt_insert_parent() only unlock the right child of the
parent page before inserting a new downlink into the parent. Update a
comment from the Berkeley days claiming that both left and right child
pages are unlocked before the new downlink actually gets inserted.

The claim that it is okay to release both locks early based on Lehman
and Yao's say-so never made much sense. Lehman and Yao must sometimes
"couple" buffer locks across a pair of internal pages when relocating a
downlink, unlike the corresponding code within _bt_getstack().

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3f34283973a342aa1cb709d6e8f5cea430efcf29

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-03-13 00:54:24 pgsql: Fix cross-version compatibility checks of pg_verify_checksums
Previous Message Tom Lane 2019-03-12 19:55:14 pgsql: Add support for hyperbolic functions, as well as log10().