Skip to content
Snippets Groups Projects
Commit 42c80c69 authored by Robert Haas's avatar Robert Haas
Browse files

Assert that syscache lookups don't happen outside transactions.

Andres Freund
parent ac33c7e2
No related branches found
No related tags found
No related merge requests found
......@@ -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
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment