diff options
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r-- | src/backend/access/index/indexam.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 1a4f36fe0a9..31b22d9f397 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -263,6 +263,14 @@ index_beginscan(Relation heapRelation, Assert(snapshot != InvalidSnapshot); + /* Check that a historic snapshot is not used for non-catalog tables */ + if (IsHistoricMVCCSnapshot(snapshot) && + !RelationIsAccessibleInLogicalDecoding(heapRelation)) + { + elog(ERROR, "cannot query non-catalog table \"%s\" during logical decoding", + RelationGetRelationName(heapRelation)); + } + scan = index_beginscan_internal(indexRelation, nkeys, norderbys, snapshot, NULL, false); /* |