Correct nbtree page split lock coupling comment.

There is no reason to distinguish between readers and writers here.
This commit is contained in:
Peter Geoghegan 2020-08-09 12:01:15 -07:00
parent 1b9cde5124
commit d129c07499
1 changed files with 3 additions and 5 deletions

View File

@ -1861,11 +1861,9 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf,
}
/*
* We have to grab the right sibling (if any) and fix the prev pointer
* there. We are guaranteed that this is deadlock-free since no other
* writer will be holding a lock on that page and trying to move left, and
* all readers release locks on a page before trying to fetch its
* neighbors.
* We have to grab the original right sibling (if any) and update its prev
* link. We are guaranteed that this is deadlock-free, since we couple
* the locks in the standard order: left to right.
*/
if (!isrightmost)
{