Skip to content

Commit d129c07

Browse files
Correct nbtree page split lock coupling comment.
There is no reason to distinguish between readers and writers here.
1 parent 1b9cde5 commit d129c07

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backend/access/nbtree/nbtinsert.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,11 +1861,9 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf,
18611861
}
18621862

18631863
/*
1864-
* We have to grab the right sibling (if any) and fix the prev pointer
1865-
* there. We are guaranteed that this is deadlock-free since no other
1866-
* writer will be holding a lock on that page and trying to move left, and
1867-
* all readers release locks on a page before trying to fetch its
1868-
* neighbors.
1864+
* We have to grab the original right sibling (if any) and update its prev
1865+
* link. We are guaranteed that this is deadlock-free, since we couple
1866+
* the locks in the standard order: left to right.
18691867
*/
18701868
if (!isrightmost)
18711869
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy