diff options
author | Tom Lane | 1999-06-04 02:19:47 +0000 |
---|---|---|
committer | Tom Lane | 1999-06-04 02:19:47 +0000 |
commit | 74e7b58b617de4e4d4479cc9b93b6ce718fc0206 (patch) | |
tree | ce929fe824c1d3b2ac5977d842e67012f5c15bc4 /src/include | |
parent | 0bddf3da818761f39ddcfa88a9006e7467773329 (diff) |
Fix for failure to clean SysCache entry when a relation is deleted
in the same transaction that created it.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/utils/catcache.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index aaf9156deca..240deeb65fa 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: catcache.h,v 1.14 1999/02/13 23:22:16 momjian Exp $ + * $Id: catcache.h,v 1.15 1999/06/04 02:19:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -28,9 +28,11 @@ typedef struct catctup { HeapTuple ct_tup; /* A pointer to a tuple */ - Dlelem *ct_node; /* points to LRU list is the CatCTup is in - * the cache, else, points to the cache if - * the CatCTup is in LRU list */ + /* Each tuple in the cache has two catctup items, one in the LRU list + * and one in the hashbucket list for its hash value. ct_node in each + * one points to the other one. + */ + Dlelem *ct_node; /* the other catctup for this tuple */ } CatCTup; /* voodoo constants */ @@ -46,6 +48,7 @@ typedef struct catcache HeapTuple (*cc_iscanfunc) (); /* index scanfunction */ TupleDesc cc_tupdesc; /* tuple descriptor from reldesc */ int id; /* XXX could be improved -hirohama */ + bool busy; /* for detecting recursive lookups */ short cc_ntup; /* # of tuples in this cache */ short cc_maxtup; /* max # of tuples allowed (LRU) */ short cc_nkeys; @@ -55,12 +58,11 @@ typedef struct catcache ScanKeyData cc_skey[4]; struct catcache *cc_next; Dllist *cc_lrulist; /* LRU list, most recent first */ - Dllist *cc_cache[NCCBUCK + 1]; + Dllist *cc_cache[NCCBUCK + 1]; /* hash buckets */ } CatCache; #define InvalidCatalogCacheId (-1) -extern struct catcache *Caches; extern GlobalMemory CacheCxt; extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex, |