Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac33c7e
)
Assert that syscache lookups don't happen outside transactions.
author
Robert Haas
<rhaas@postgresql.org>
Mon, 15 Jul 2013 17:31:36 +0000
(13:31 -0400)
committer
Robert Haas
<rhaas@postgresql.org>
Mon, 15 Jul 2013 17:31:36 +0000
(13:31 -0400)
Andres Freund
src/backend/utils/cache/catcache.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/cache/catcache.c
b/src/backend/utils/cache/catcache.c
index d12da7615a1b59147d6a8157230170350a1dc0ed..cca0572a5dc00a87ab7b0aff5cce4400d19af715 100644
(file)
--- a/
src/backend/utils/cache/catcache.c
+++ b/
src/backend/utils/cache/catcache.c
@@
-21,6
+21,7
@@
#include "access/sysattr.h"
#include "access/tuptoaster.h"
#include "access/valid.h"
+#include "access/xact.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
#include "miscadmin.h"
@@
-1067,6
+1068,9
@@
SearchCatCache(CatCache *cache,
SysScanDesc scandesc;
HeapTuple ntp;
+ /* Make sure we're in a xact, even if this ends up being a cache hit */
+ Assert(IsTransactionState());
+
/*
* one-time startup overhead for each cache
*/