Commit d129c074 authored by Peter Geoghegan's avatar Peter Geoghegan

Correct nbtree page split lock coupling comment.

There is no reason to distinguish between readers and writers here.
parent 1b9cde51
...@@ -1861,11 +1861,9 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf, ...@@ -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 * We have to grab the original right sibling (if any) and update its prev
* there. We are guaranteed that this is deadlock-free since no other * link. We are guaranteed that this is deadlock-free, since we couple
* writer will be holding a lock on that page and trying to move left, and * the locks in the standard order: left to right.
* all readers release locks on a page before trying to fetch its
* neighbors.
*/ */
if (!isrightmost) if (!isrightmost)
{ {
......
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