projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f31005e
)
Assert(IsTransactionState()) in RelationIdGetRelation().
author
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 6 Feb 2014 16:28:13 +0000
(11:28 -0500)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 6 Feb 2014 16:28:13 +0000
(11:28 -0500)
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.
src/backend/utils/cache/relcache.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/cache/relcache.c
b/src/backend/utils/cache/relcache.c
index 2a46cfcff711ac8b131e4fc0fbf53b45300ef02f..d47d2d37fcb089d210e2457db4d6adf882ccf508 100644
(file)
--- a/
src/backend/utils/cache/relcache.c
+++ b/
src/backend/utils/cache/relcache.c
@@
-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
*/