Skip to content

Commit ddfc9cb

Browse files
committed
Assert(IsTransactionState()) in RelationIdGetRelation().
Commit 42c80c6 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.
1 parent f31005e commit ddfc9cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/cache/relcache.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,9 @@ RelationIdGetRelation(Oid relationId)
15781578
{
15791579
Relation rd;
15801580

1581+
/* Make sure we're in an xact, even if this ends up being a cache hit */
1582+
Assert(IsTransactionState());
1583+
15811584
/*
15821585
* first try to find reldesc in the cache
15831586
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy