summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2017-01-12 23:59:46 +0000
committerTom Lane2017-01-12 23:59:57 +0000
commite2117e4ab0d7fcb76f20cbf2e52541998d639d9e (patch)
treee4da56a7a366f6f5183d76e4b3b9883610e134b9
parent750c59d7ec573f9443af2eb7d9186946bc7e008c (diff)
Fix field order in struct catcache.
Somebody failed to grasp the point of having the #ifdef CATCACHE_STATS fields at the end of the struct. Put that back the way it should be, and add a comment making it more explicit why it should be that way.
-rw-r--r--src/include/utils/catcache.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index 2cee8b85f5..299d246585 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -52,6 +52,12 @@ typedef struct catcache
* heap scans */
bool cc_isname[CATCACHE_MAXKEYS]; /* flag "name" key columns */
dlist_head cc_lists; /* list of CatCList structs */
+ dlist_head *cc_bucket; /* hash buckets */
+
+ /*
+ * Keep these at the end, so that compiling catcache.c with CATCACHE_STATS
+ * doesn't break ABI for other modules
+ */
#ifdef CATCACHE_STATS
long cc_searches; /* total # searches against this cache */
long cc_hits; /* # of matches against existing entry */
@@ -66,7 +72,6 @@ typedef struct catcache
long cc_lsearches; /* total # list-searches */
long cc_lhits; /* # of matches against existing lists */
#endif
- dlist_head *cc_bucket; /* hash buckets */
} CatCache;