Skip to content
Snippets Groups Projects
Commit ddfc9cb0 authored by Tom Lane's avatar Tom Lane
Browse files

Assert(IsTransactionState()) in RelationIdGetRelation().

Commit 42c80c69 added an
Assert(IsTransactionState()) in SearchCatCache(), to catch
any code that thought it could do a catcache lookup outside
transactions.  Extend the same idea to relcache lookups.
parent f31005e3
Branches
Tags
No related merge requests found
...@@ -1578,6 +1578,9 @@ RelationIdGetRelation(Oid relationId) ...@@ -1578,6 +1578,9 @@ RelationIdGetRelation(Oid relationId)
{ {
Relation rd; 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 * first try to find reldesc in the cache
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment