diff options
Diffstat (limited to 'src/backend/access/gin/ginbtree.c')
-rw-r--r-- | src/backend/access/gin/ginbtree.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c index 030d0f44183..78213dcb4ef 100644 --- a/src/backend/access/gin/ginbtree.c +++ b/src/backend/access/gin/ginbtree.c @@ -72,9 +72,13 @@ ginTraverseLock(Buffer buffer, bool searchMode) * If 'searchmode' is false, on return stack->buffer is exclusively locked, * and the stack represents the full path to the root. Otherwise stack->buffer * is share-locked, and stack->parent is NULL. + * + * If 'rootConflictCheck' is true, tree root is checked for serialization + * conflict. */ GinBtreeStack * -ginFindLeafPage(GinBtree btree, bool searchMode, Snapshot snapshot) +ginFindLeafPage(GinBtree btree, bool searchMode, + bool rootConflictCheck, Snapshot snapshot) { GinBtreeStack *stack; @@ -84,7 +88,7 @@ ginFindLeafPage(GinBtree btree, bool searchMode, Snapshot snapshot) stack->parent = NULL; stack->predictNumber = 1; - if (!searchMode) + if (rootConflictCheck) CheckForSerializableConflictIn(btree->index, NULL, stack->buffer); for (;;) |