Commit 2c5aa2ac authored by Tom Lane's avatar Tom Lane

Do some restructuring to improve performance of the catcaches. Teach

CatalogCacheFlushRelation (formerly called SystemCacheRelationFlushed)
how to distinguish tuples it should flush from those it needn't; this
means a relcache flush event now only removes the catcache entries
it ought to, rather than zapping the caches completely as it used to.
Testing with the regression tests indicates that this considerably
improves the lifespan of catcache entries.  Also, rearrange catcache
data structures so that the limit on number of cached tuples applies
globally across all the catcaches, rather than being per-catcache.
It was a little silly to have the same size limit on both, say,
pg_attribute caches and pg_am caches (there being only four possible
rows in the latter...).  Doing LRU removal across all the caches
instead of locally in each one should reduce cache reload traffic
in the more heavily used caches and improve the efficiency of
cache memory use.
parent 41c377f5
This diff is collapsed.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.43 2001/06/01 20:23:06 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.44 2001/06/18 03:35:07 tgl Exp $
* *
* Note - this code is real crufty... badly needs a rewrite to improve * Note - this code is real crufty... badly needs a rewrite to improve
* readability and portability. (Shouldn't assume Oid == Index, for example) * readability and portability. (Shouldn't assume Oid == Index, for example)
...@@ -478,16 +478,20 @@ CacheIdInvalidate(Index cacheId, ...@@ -478,16 +478,20 @@ CacheIdInvalidate(Index cacheId,
} }
/* /*
* ResetSystemCaches * InvalidateSystemCaches
* *
* This blows away all tuples in the system catalog caches and * This blows away all tuples in the system catalog caches and
* all the cached relation descriptors (and closes their files too). * all the cached relation descriptors (and closes their files too).
* Relation descriptors that have positive refcounts are then rebuilt. * Relation descriptors that have positive refcounts are then rebuilt.
*
* We call this when we see a shared-inval-queue overflow signal,
* since that tells us we've lost some shared-inval messages and hence
* don't know what needs to be invalidated.
*/ */
static void static void
ResetSystemCaches(void) InvalidateSystemCaches(void)
{ {
ResetSystemCache(); ResetCatalogCaches();
RelationCacheInvalidate(); RelationCacheInvalidate();
} }
...@@ -643,7 +647,7 @@ DiscardInvalid(void) ...@@ -643,7 +647,7 @@ DiscardInvalid(void)
elog(DEBUG, "DiscardInvalid called"); elog(DEBUG, "DiscardInvalid called");
#endif /* defined(INVALIDDEBUG) */ #endif /* defined(INVALIDDEBUG) */
InvalidateSharedInvalid(CacheIdInvalidate, ResetSystemCaches); InvalidateSharedInvalid(CacheIdInvalidate, InvalidateSystemCaches);
} }
/* /*
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.137 2001/06/12 05:55:49 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.138 2001/06/18 03:35:07 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1657,7 +1657,7 @@ RelationClearRelation(Relation relation, bool rebuildIt) ...@@ -1657,7 +1657,7 @@ RelationClearRelation(Relation relation, bool rebuildIt)
MemoryContextSwitchTo(oldcxt); MemoryContextSwitchTo(oldcxt);
/* Clear out catcache's entries for this relation */ /* Clear out catcache's entries for this relation */
SystemCacheRelationFlushed(RelationGetRelid(relation)); CatalogCacheFlushRelation(RelationGetRelid(relation));
/* /*
* Free all the subsidiary data structures of the relcache entry. We * Free all the subsidiary data structures of the relcache entry. We
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.62 2001/06/12 05:55:49 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.63 2001/06/18 03:35:07 tgl Exp $
* *
* NOTES * NOTES
* These routines allow the parser/planner/executor to perform * These routines allow the parser/planner/executor to perform
...@@ -54,7 +54,12 @@ ...@@ -54,7 +54,12 @@
Add your entry to the cacheinfo[] array below. All cache lists are Add your entry to the cacheinfo[] array below. All cache lists are
alphabetical, so add it in the proper place. Specify the relation alphabetical, so add it in the proper place. Specify the relation
name, index name, number of keys, and key attribute numbers. name, index name, number of keys, and key attribute numbers. If the
relation contains tuples that are associated with a particular relation
(for example, its attributes, rules, triggers, etc) then specify the
attribute number that contains the OID of the associated relation.
This is used by CatalogCacheFlushRelation() to remove the correct
tuples during a table drop or relcache invalidation event.
In include/catalog/indexing.h, add a define for the number of indexes In include/catalog/indexing.h, add a define for the number of indexes
on the relation, add define(s) for the index name(s), add an extern on the relation, add define(s) for the index name(s), add an extern
...@@ -76,12 +81,12 @@ ...@@ -76,12 +81,12 @@
/* /*
* struct cachedesc: information defining a single syscache * struct cachedesc: information defining a single syscache
*
*/ */
struct cachedesc struct cachedesc
{ {
char *name; /* name of the relation being cached */ char *name; /* name of the relation being cached */
char *indname; /* name of index relation for this cache */ char *indname; /* name of index relation for this cache */
int reloidattr; /* attr number of rel OID reference, or 0 */
int nkeys; /* # of keys needed for cache lookup */ int nkeys; /* # of keys needed for cache lookup */
int key[4]; /* attribute numbers of key attrs */ int key[4]; /* attribute numbers of key attrs */
}; };
...@@ -89,6 +94,7 @@ struct cachedesc ...@@ -89,6 +94,7 @@ struct cachedesc
static struct cachedesc cacheinfo[] = { static struct cachedesc cacheinfo[] = {
{AggregateRelationName, /* AGGNAME */ {AggregateRelationName, /* AGGNAME */
AggregateNameTypeIndex, AggregateNameTypeIndex,
0,
2, 2,
{ {
Anum_pg_aggregate_aggname, Anum_pg_aggregate_aggname,
...@@ -98,6 +104,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -98,6 +104,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{AccessMethodRelationName, /* AMNAME */ {AccessMethodRelationName, /* AMNAME */
AmNameIndex, AmNameIndex,
0,
1, 1,
{ {
Anum_pg_am_amname, Anum_pg_am_amname,
...@@ -107,6 +114,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -107,6 +114,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{AccessMethodOperatorRelationName, /* AMOPOPID */ {AccessMethodOperatorRelationName, /* AMOPOPID */
AccessMethodOpidIndex, AccessMethodOpidIndex,
0,
3, 3,
{ {
Anum_pg_amop_amopclaid, Anum_pg_amop_amopclaid,
...@@ -116,6 +124,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -116,6 +124,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{AccessMethodOperatorRelationName, /* AMOPSTRATEGY */ {AccessMethodOperatorRelationName, /* AMOPSTRATEGY */
AccessMethodStrategyIndex, AccessMethodStrategyIndex,
0,
3, 3,
{ {
Anum_pg_amop_amopid, Anum_pg_amop_amopid,
...@@ -125,6 +134,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -125,6 +134,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{AttributeRelationName, /* ATTNAME */ {AttributeRelationName, /* ATTNAME */
AttributeRelidNameIndex, AttributeRelidNameIndex,
Anum_pg_attribute_attrelid,
2, 2,
{ {
Anum_pg_attribute_attrelid, Anum_pg_attribute_attrelid,
...@@ -134,6 +144,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -134,6 +144,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{AttributeRelationName, /* ATTNUM */ {AttributeRelationName, /* ATTNUM */
AttributeRelidNumIndex, AttributeRelidNumIndex,
Anum_pg_attribute_attrelid,
2, 2,
{ {
Anum_pg_attribute_attrelid, Anum_pg_attribute_attrelid,
...@@ -143,6 +154,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -143,6 +154,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{OperatorClassRelationName, /* CLADEFTYPE */ {OperatorClassRelationName, /* CLADEFTYPE */
OpclassDeftypeIndex, OpclassDeftypeIndex,
0,
1, 1,
{ {
Anum_pg_opclass_opcdeftype, Anum_pg_opclass_opcdeftype,
...@@ -152,6 +164,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -152,6 +164,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{OperatorClassRelationName, /* CLANAME */ {OperatorClassRelationName, /* CLANAME */
OpclassNameIndex, OpclassNameIndex,
0,
1, 1,
{ {
Anum_pg_opclass_opcname, Anum_pg_opclass_opcname,
...@@ -161,6 +174,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -161,6 +174,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{GroupRelationName, /* GRONAME */ {GroupRelationName, /* GRONAME */
GroupNameIndex, GroupNameIndex,
0,
1, 1,
{ {
Anum_pg_group_groname, Anum_pg_group_groname,
...@@ -170,6 +184,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -170,6 +184,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{GroupRelationName, /* GROSYSID */ {GroupRelationName, /* GROSYSID */
GroupSysidIndex, GroupSysidIndex,
0,
1, 1,
{ {
Anum_pg_group_grosysid, Anum_pg_group_grosysid,
...@@ -179,6 +194,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -179,6 +194,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{IndexRelationName, /* INDEXRELID */ {IndexRelationName, /* INDEXRELID */
IndexRelidIndex, IndexRelidIndex,
Anum_pg_index_indrelid,
1, 1,
{ {
Anum_pg_index_indexrelid, Anum_pg_index_indexrelid,
...@@ -188,6 +204,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -188,6 +204,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{InheritsRelationName, /* INHRELID */ {InheritsRelationName, /* INHRELID */
InheritsRelidSeqnoIndex, InheritsRelidSeqnoIndex,
Anum_pg_inherits_inhrelid,
2, 2,
{ {
Anum_pg_inherits_inhrelid, Anum_pg_inherits_inhrelid,
...@@ -197,6 +214,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -197,6 +214,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{LanguageRelationName, /* LANGNAME */ {LanguageRelationName, /* LANGNAME */
LanguageNameIndex, LanguageNameIndex,
0,
1, 1,
{ {
Anum_pg_language_lanname, Anum_pg_language_lanname,
...@@ -206,6 +224,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -206,6 +224,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{LanguageRelationName, /* LANGOID */ {LanguageRelationName, /* LANGOID */
LanguageOidIndex, LanguageOidIndex,
0,
1, 1,
{ {
ObjectIdAttributeNumber, ObjectIdAttributeNumber,
...@@ -215,6 +234,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -215,6 +234,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{OperatorRelationName, /* OPERNAME */ {OperatorRelationName, /* OPERNAME */
OperatorNameIndex, OperatorNameIndex,
0,
4, 4,
{ {
Anum_pg_operator_oprname, Anum_pg_operator_oprname,
...@@ -224,6 +244,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -224,6 +244,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{OperatorRelationName, /* OPEROID */ {OperatorRelationName, /* OPEROID */
OperatorOidIndex, OperatorOidIndex,
0,
1, 1,
{ {
ObjectIdAttributeNumber, ObjectIdAttributeNumber,
...@@ -233,6 +254,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -233,6 +254,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{ProcedureRelationName, /* PROCNAME */ {ProcedureRelationName, /* PROCNAME */
ProcedureNameIndex, ProcedureNameIndex,
0,
3, 3,
{ {
Anum_pg_proc_proname, Anum_pg_proc_proname,
...@@ -242,6 +264,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -242,6 +264,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{ProcedureRelationName, /* PROCOID */ {ProcedureRelationName, /* PROCOID */
ProcedureOidIndex, ProcedureOidIndex,
0,
1, 1,
{ {
ObjectIdAttributeNumber, ObjectIdAttributeNumber,
...@@ -251,6 +274,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -251,6 +274,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{RelationRelationName, /* RELNAME */ {RelationRelationName, /* RELNAME */
ClassNameIndex, ClassNameIndex,
ObjectIdAttributeNumber,
1, 1,
{ {
Anum_pg_class_relname, Anum_pg_class_relname,
...@@ -260,6 +284,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -260,6 +284,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{RelationRelationName, /* RELOID */ {RelationRelationName, /* RELOID */
ClassOidIndex, ClassOidIndex,
ObjectIdAttributeNumber,
1, 1,
{ {
ObjectIdAttributeNumber, ObjectIdAttributeNumber,
...@@ -269,6 +294,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -269,6 +294,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{RewriteRelationName, /* RULENAME */ {RewriteRelationName, /* RULENAME */
RewriteRulenameIndex, RewriteRulenameIndex,
Anum_pg_rewrite_ev_class,
1, 1,
{ {
Anum_pg_rewrite_rulename, Anum_pg_rewrite_rulename,
...@@ -278,6 +304,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -278,6 +304,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{ShadowRelationName, /* SHADOWNAME */ {ShadowRelationName, /* SHADOWNAME */
ShadowNameIndex, ShadowNameIndex,
0,
1, 1,
{ {
Anum_pg_shadow_usename, Anum_pg_shadow_usename,
...@@ -287,6 +314,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -287,6 +314,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{ShadowRelationName, /* SHADOWSYSID */ {ShadowRelationName, /* SHADOWSYSID */
ShadowSysidIndex, ShadowSysidIndex,
0,
1, 1,
{ {
Anum_pg_shadow_usesysid, Anum_pg_shadow_usesysid,
...@@ -296,6 +324,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -296,6 +324,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{StatisticRelationName, /* STATRELATT */ {StatisticRelationName, /* STATRELATT */
StatisticRelidAttnumIndex, StatisticRelidAttnumIndex,
Anum_pg_statistic_starelid,
2, 2,
{ {
Anum_pg_statistic_starelid, Anum_pg_statistic_starelid,
...@@ -305,6 +334,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -305,6 +334,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{TypeRelationName, /* TYPENAME */ {TypeRelationName, /* TYPENAME */
TypeNameIndex, TypeNameIndex,
Anum_pg_type_typrelid,
1, 1,
{ {
Anum_pg_type_typname, Anum_pg_type_typname,
...@@ -314,6 +344,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -314,6 +344,7 @@ static struct cachedesc cacheinfo[] = {
}}, }},
{TypeRelationName, /* TYPEOID */ {TypeRelationName, /* TYPEOID */
TypeOidIndex, TypeOidIndex,
Anum_pg_type_typrelid,
1, 1,
{ {
ObjectIdAttributeNumber, ObjectIdAttributeNumber,
...@@ -323,8 +354,7 @@ static struct cachedesc cacheinfo[] = { ...@@ -323,8 +354,7 @@ static struct cachedesc cacheinfo[] = {
}} }}
}; };
static CatCache *SysCache[ static CatCache *SysCache[lengthof(cacheinfo)];
lengthof(cacheinfo)];
static int SysCacheSize = lengthof(cacheinfo); static int SysCacheSize = lengthof(cacheinfo);
static bool CacheInitialized = false; static bool CacheInitialized = false;
...@@ -358,6 +388,7 @@ InitCatalogCache(void) ...@@ -358,6 +388,7 @@ InitCatalogCache(void)
SysCache[cacheId] = InitCatCache(cacheId, SysCache[cacheId] = InitCatCache(cacheId,
cacheinfo[cacheId].name, cacheinfo[cacheId].name,
cacheinfo[cacheId].indname, cacheinfo[cacheId].indname,
cacheinfo[cacheId].reloidattr,
cacheinfo[cacheId].nkeys, cacheinfo[cacheId].nkeys,
cacheinfo[cacheId].key); cacheinfo[cacheId].key);
if (!PointerIsValid(SysCache[cacheId])) if (!PointerIsValid(SysCache[cacheId]))
......
...@@ -13,32 +13,49 @@ ...@@ -13,32 +13,49 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: catcache.h,v 1.32 2001/03/22 04:01:11 momjian Exp $ * $Id: catcache.h,v 1.33 2001/06/18 03:35:07 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef CATCACHE_H #ifndef CATCACHE_H
#define CATCACHE_H #define CATCACHE_H
/* #define CACHEDEBUG *//* turns DEBUG elogs on */
#include "access/htup.h" #include "access/htup.h"
#include "lib/dllist.h" #include "lib/dllist.h"
/* /*
* struct catctup: individual tuple in the cache. * struct catctup: individual tuple in the cache.
* struct catcache: information for managing a cache. * struct catcache: information for managing a cache.
* struct catcacheheader: information for managing all the caches.
*/ */
typedef struct catcache
{
int id; /* cache identifier --- see syscache.h */
struct catcache *cc_next; /* link to next catcache */
char *cc_relname; /* name of relation the tuples come from */
char *cc_indname; /* name of index matching cache keys */
int cc_reloidattr; /* AttrNumber of relation OID, or 0 */
TupleDesc cc_tupdesc; /* tuple descriptor (copied from reldesc) */
int cc_ntup; /* # of tuples currently in this cache */
int cc_size; /* # of hash buckets in this cache */
int cc_nkeys; /* number of keys (1..4) */
int cc_key[4]; /* AttrNumber of each key */
PGFunction cc_hashfunc[4]; /* hash function to use for each key */
ScanKeyData cc_skey[4]; /* precomputed key info for heap scans */
Dllist cc_bucket[1]; /* hash buckets --- VARIABLE LENGTH ARRAY */
} CatCache; /* VARIABLE LENGTH STRUCT */
typedef struct catctup typedef struct catctup
{ {
int ct_magic; /* for Assert checks */ int ct_magic; /* for Assert checks */
#define CT_MAGIC 0x57261502 #define CT_MAGIC 0x57261502
CatCache *my_cache; /* link to owning catcache */
/* /*
* Each tuple in a cache is a member of two lists: one lists all the * Each tuple in a cache is a member of two lists: one lists all the
* elements in that cache in LRU order, and the other lists just the * elements in all the caches in LRU order, and the other lists just
* elements in one hashbucket, also in LRU order. * the elements in one hashbucket of one cache, also in LRU order.
* *
* A tuple marked "dead" must not be returned by subsequent searches. * A tuple marked "dead" must not be returned by subsequent searches.
* However, it won't be physically deleted from the cache until its * However, it won't be physically deleted from the cache until its
...@@ -52,30 +69,14 @@ typedef struct catctup ...@@ -52,30 +69,14 @@ typedef struct catctup
} CatCTup; } CatCTup;
/* voodoo constants */ typedef struct catcacheheader
#define NCCBUCK 500 /* CatCache buckets */
#define MAXTUP 500 /* Maximum # of tuples stored per cache */
typedef struct catcache
{ {
int id; /* cache identifier --- see syscache.h */ CatCache *ch_caches; /* head of list of CatCache structs */
struct catcache *cc_next; /* link to next catcache */ int ch_ntup; /* # of tuples in all caches */
char *cc_relname; /* name of relation the tuples come from */ int ch_maxtup; /* max # of tuples allowed (LRU) */
char *cc_indname; /* name of index matching cache keys */ Dllist ch_lrulist; /* overall LRU list, most recent first */
TupleDesc cc_tupdesc; /* tuple descriptor (copied from reldesc) */ } CatCacheHeader;
short cc_ntup; /* # of tuples in this cache */
short cc_maxtup; /* max # of tuples allowed (LRU) */
short cc_size; /* # of hash buckets in this cache */
short cc_nkeys; /* number of keys (1..4) */
short cc_key[4]; /* AttrNumber of each key */
PGFunction cc_hashfunc[4]; /* hash function to use for each key */
ScanKeyData cc_skey[4]; /* precomputed key info for heap scans */
Dllist cc_lrulist; /* overall LRU list, most recent first */
Dllist cc_cache[NCCBUCK]; /* hash buckets */
} CatCache;
#define InvalidCatalogCacheId (-1)
/* this extern duplicates utils/memutils.h... */ /* this extern duplicates utils/memutils.h... */
extern MemoryContext CacheMemoryContext; extern MemoryContext CacheMemoryContext;
...@@ -84,15 +85,16 @@ extern void CreateCacheMemoryContext(void); ...@@ -84,15 +85,16 @@ extern void CreateCacheMemoryContext(void);
extern void AtEOXact_CatCache(bool isCommit); extern void AtEOXact_CatCache(bool isCommit);
extern CatCache *InitCatCache(int id, char *relname, char *indname, extern CatCache *InitCatCache(int id, char *relname, char *indname,
int nkeys, int *key); int reloidattr,
int nkeys, int *key);
extern HeapTuple SearchCatCache(CatCache *cache, extern HeapTuple SearchCatCache(CatCache *cache,
Datum v1, Datum v2, Datum v1, Datum v2,
Datum v3, Datum v4); Datum v3, Datum v4);
extern void ReleaseCatCache(HeapTuple tuple); extern void ReleaseCatCache(HeapTuple tuple);
extern void ResetSystemCache(void); extern void ResetCatalogCaches(void);
extern void SystemCacheRelationFlushed(Oid relId); extern void CatalogCacheFlushRelation(Oid relId);
extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex, extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex,
ItemPointer pointer); ItemPointer pointer);
extern void PrepareToInvalidateCacheTuple(Relation relation, extern void PrepareToInvalidateCacheTuple(Relation relation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment