aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtutils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 50cbf06cb45..afff7d63922 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -1813,6 +1813,12 @@ _bt_advance_array_keys(IndexScanDesc scan, BTReadPageState *pstate,
all_required_satisfied = true,
all_satisfied = true;
+ /*
+ * Unset so->scanBehind (and so->oppositeDirCheck) in case they're still
+ * set from back when we dealt with the previous page's high key/finaltup
+ */
+ so->scanBehind = so->oppositeDirCheck = false;
+
if (sktrig_required)
{
/*
@@ -1821,8 +1827,6 @@ _bt_advance_array_keys(IndexScanDesc scan, BTReadPageState *pstate,
Assert(!_bt_tuple_before_array_skeys(scan, dir, tuple, tupdesc,
tupnatts, false, 0, NULL));
- so->scanBehind = so->oppositeDirCheck = false; /* reset */
-
/*
* Required scan key wasn't satisfied, so required arrays will have to
* advance. Invalidate page-level state that tracks whether the