1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Explain subtlety in nbtree locking protocol.

The Postgres approach to coupling locks during an ascent of the tree is
slightly different to the approach taken by Lehman and Yao.  Add a new
paragraph to the "Differences to the Lehman & Yao algorithm" section of
the nbtree README that explains the similarities and differences.
This commit is contained in:
Peter Geoghegan
2019-08-23 20:24:49 -07:00
parent 989d23b04b
commit 867d25ccb4
2 changed files with 23 additions and 7 deletions

View File

@@ -2019,6 +2019,9 @@ _bt_getstackbuf(Relation rel, BTStack stack, BlockNumber child)
/*
* The item we're looking for moved right at least one page.
*
* Lehman and Yao couple/chain locks when moving right here, which we
* can avoid. See nbtree/README.
*/
if (P_RIGHTMOST(opaque))
{