aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/index/indexam.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index fe80b8b0bac..dc303995e5b 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -209,6 +209,8 @@ index_beginscan(Relation heapRelation,
{
IndexScanDesc scan;
+ Assert(snapshot != InvalidSnapshot);
+
scan = index_beginscan_internal(indexRelation, nkeys, norderbys, snapshot, NULL, false);
/*
@@ -237,6 +239,8 @@ index_beginscan_bitmap(Relation indexRelation,
{
IndexScanDesc scan;
+ Assert(snapshot != InvalidSnapshot);
+
scan = index_beginscan_internal(indexRelation, nkeys, 0, snapshot, NULL, false);
/*
@@ -403,6 +407,8 @@ index_parallelscan_estimate(Relation indexRelation, Snapshot snapshot)
{
Size nbytes;
+ Assert(snapshot != InvalidSnapshot);
+
RELATION_CHECKS;
nbytes = offsetof(ParallelIndexScanDescData, ps_snapshot_data);
@@ -437,6 +443,8 @@ index_parallelscan_initialize(Relation heapRelation, Relation indexRelation,
{
Size offset;
+ Assert(snapshot != InvalidSnapshot);
+
RELATION_CHECKS;
offset = add_size(offsetof(ParallelIndexScanDescData, ps_snapshot_data),