Skip to content

Commit e2117e4

Browse files
committed
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.
1 parent 750c59d commit e2117e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/include/utils/catcache.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ typedef struct catcache
5252
* heap scans */
5353
bool cc_isname[CATCACHE_MAXKEYS]; /* flag "name" key columns */
5454
dlist_head cc_lists; /* list of CatCList structs */
55+
dlist_head *cc_bucket; /* hash buckets */
56+
57+
/*
58+
* Keep these at the end, so that compiling catcache.c with CATCACHE_STATS
59+
* doesn't break ABI for other modules
60+
*/
5561
#ifdef CATCACHE_STATS
5662
long cc_searches; /* total # searches against this cache */
5763
long cc_hits; /* # of matches against existing entry */
@@ -66,7 +72,6 @@ typedef struct catcache
6672
long cc_lsearches; /* total # list-searches */
6773
long cc_lhits; /* # of matches against existing lists */
6874
#endif
69-
dlist_head *cc_bucket; /* hash buckets */
7075
} CatCache;
7176

7277

0 commit comments

Comments
 (0)