We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac33c7e commit 42c80c6Copy full SHA for 42c80c6
src/backend/utils/cache/catcache.c
@@ -21,6 +21,7 @@
21
#include "access/sysattr.h"
22
#include "access/tuptoaster.h"
23
#include "access/valid.h"
24
+#include "access/xact.h"
25
#include "catalog/pg_operator.h"
26
#include "catalog/pg_type.h"
27
#include "miscadmin.h"
@@ -1067,6 +1068,9 @@ SearchCatCache(CatCache *cache,
1067
1068
SysScanDesc scandesc;
1069
HeapTuple ntp;
1070
1071
+ /* Make sure we're in a xact, even if this ends up being a cache hit */
1072
+ Assert(IsTransactionState());
1073
+
1074
/*
1075
* one-time startup overhead for each cache
1076
*/
0 commit comments