summaryrefslogtreecommitdiff
path: root/src/include/utils/catcache.h
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2025-11-17 12:26:41 +1300
committerDavid Rowley <drowley@postgresql.org>2025-11-17 12:26:41 +1300
commit9c047da51f270b25fe03ee114e1de0c64aa9cc18 (patch)
treec668c5e03c9174d5777d455d9f527a06dc497ec2 /src/include/utils/catcache.h
parente7cde9dad285acb579b189e82a57fa7b98f23a11 (diff)
Get rid of long datatype in CATCACHE_STATS enabled builds
"long" is 32 bits on Windows 64-bit. Switch to a datatype that's 64-bit on all platforms. While we're there, use an unsigned type as these fields count things that have occurred, of which it's not possible to have negative numbers of. Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CAApHDvoGFjSA3aNyVQ3ivbyc4ST=CC5L-_VjEUQ92HbE2Cxovg@mail.gmail.com
Diffstat (limited to 'src/include/utils/catcache.h')
-rw-r--r--src/include/utils/catcache.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index 00808e23f49..fdd733cf7d8 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -69,18 +69,18 @@ typedef struct catcache
* 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 */
- long cc_neg_hits; /* # of matches against negative entry */
- long cc_newloads; /* # of successful loads of new entry */
+ uint64 cc_searches; /* total # searches against this cache */
+ uint64 cc_hits; /* # of matches against existing entry */
+ uint64 cc_neg_hits; /* # of matches against negative entry */
+ uint64 cc_newloads; /* # of successful loads of new entry */
/*
* cc_searches - (cc_hits + cc_neg_hits + cc_newloads) is number of failed
* searches, each of which will result in loading a negative entry
*/
- long cc_invals; /* # of entries invalidated from cache */
- long cc_lsearches; /* total # list-searches */
- long cc_lhits; /* # of matches against existing lists */
+ uint64 cc_invals; /* # of entries invalidated from cache */
+ uint64 cc_lsearches; /* total # list-searches */
+ uint64 cc_lhits; /* # of matches against existing lists */
#endif
} CatCache;