mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 12:20:31 +01:00
Assert(IsTransactionState()) in RelationIdGetRelation().
Commit 42c80c696e 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.
This commit is contained in:
parent
f31005e340
commit
ddfc9cb054
3
src/backend/utils/cache/relcache.c
vendored
3
src/backend/utils/cache/relcache.c
vendored
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user