diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 2a46cfcff7..d47d2d37fc 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1578,6 +1578,9 @@ RelationIdGetRelation(Oid relationId) { Relation rd; + /* Make sure we're in an xact, even if this ends up being a cache hit */ + Assert(IsTransactionState()); + /* * first try to find reldesc in the cache */