aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/catcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/catcache.h')
-rw-r--r--src/include/utils/catcache.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index de5957441ac..6ad0d74851c 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catcache.h,v 1.37 2001/11/05 17:46:36 momjian Exp $
+ * $Id: catcache.h,v 1.38 2002/02/19 20:11:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,6 +44,12 @@ typedef struct catcache
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 */
+#ifdef CATCACHE_STATS
+ long cc_searches; /* total # searches against this cache */
+ long cc_hits; /* # of matches against existing entry */
+ long cc_newloads; /* # of successful loads of new entry */
+ /* cc_searches - (cc_hits + cc_newloads) is # of failed searches */
+#endif
Dllist cc_bucket[1]; /* hash buckets --- VARIABLE LENGTH ARRAY */
} CatCache; /* VARIABLE LENGTH STRUCT */
@@ -89,6 +95,7 @@ extern void AtEOXact_CatCache(bool isCommit);
extern CatCache *InitCatCache(int id, char *relname, char *indname,
int reloidattr,
int nkeys, int *key);
+extern void InitCatCachePhase2(CatCache *cache);
extern HeapTuple SearchCatCache(CatCache *cache,
Datum v1, Datum v2,