aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-08-09 12:01:15 -0700
committerPeter Geoghegan <pg@bowt.ie>2020-08-09 12:01:15 -0700
commitd129c07499dbf0d5960115173515e3ce384c662a (patch)
tree3eab2c5e5715cf65d5e393bd42a60896cea45f15 /src
parent1b9cde51246c7773eac119b84cc18095118735de (diff)
downloadpostgresql-d129c07499dbf0d5960115173515e3ce384c662a.tar.gz
postgresql-d129c07499dbf0d5960115173515e3ce384c662a.zip
Correct nbtree page split lock coupling comment.
There is no reason to distinguish between readers and writers here.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtinsert.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index e3a44bc09e0..d36f7557c87 100644
--- 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)
{