git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b9cde5)
Correct nbtree page split lock coupling comment.
Sun, 9 Aug 2020 19:01:15 +0000 (12:01 -0700)
Sun, 9 Aug 2020 19:01:15 +0000 (12:01 -0700)
There is no reason to distinguish between readers and writers here.


diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index e3a44bc09e021a6c4966875f9d6f9f7e9f0039e8..d36f7557c87c8f27cd5884628cba8d8fb9c52aaa 100644 (file)
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -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)
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /