mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Assert(IsTransactionState()) in RelationIdGetRelation().
Commit 42c80c696e9c8323841180029cc62741c21bd356 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;
|
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
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user