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:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user