mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03: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:
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;
|
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
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user