summaryrefslogtreecommitdiff
path: root/src/include/utils/inval.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-03 09:11:48 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-03 09:45:17 +0200
commit63599896545c7869f7dd28cd593e8b548983d613 (patch)
treecc868c3cca49fa94b8ccbcc69df780e924efeca8 /src/include/utils/inval.h
parentaba8f61c30911cbac1a310b7d21777e04711c66e (diff)
Generate GUC tables from .dat file
Store the information in guc_tables.c in a .dat file similar to the catalog data in src/include/catalog/, and generate a part of guc_tables.c from that. The goal is to make it easier to edit that information, and to be able to make changes to the downstream data structures more easily. (Essentially, those are the same reasons as for the original adoption of the .dat format.) Reviewed-by: John Naylor <johncnaylorls@gmail.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: David E. Wheeler <david@justatheory.com> Discussion: https://www.postgresql.org/message-id/flat/dae6fe89-1e0c-4c3f-8d92-19d23374fb10%40eisentraut.org
Diffstat (limited to 'src/include/utils/inval.h')
-rw-r--r--src/include/utils/inval.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h
index 9b871caef62..af466252578 100644
--- a/src/include/utils/inval.h
+++ b/src/include/utils/inval.h
@@ -20,6 +20,24 @@
extern PGDLLIMPORT int debug_discard_caches;
+#define MIN_DEBUG_DISCARD_CACHES 0
+
+#ifdef DISCARD_CACHES_ENABLED
+ /* Set default based on older compile-time-only cache clobber macros */
+#if defined(CLOBBER_CACHE_RECURSIVELY)
+#define DEFAULT_DEBUG_DISCARD_CACHES 3
+#elif defined(CLOBBER_CACHE_ALWAYS)
+#define DEFAULT_DEBUG_DISCARD_CACHES 1
+#else
+#define DEFAULT_DEBUG_DISCARD_CACHES 0
+#endif
+#define MAX_DEBUG_DISCARD_CACHES 5
+#else /* not DISCARD_CACHES_ENABLED */
+#define DEFAULT_DEBUG_DISCARD_CACHES 0
+#define MAX_DEBUG_DISCARD_CACHES 0
+#endif /* not DISCARD_CACHES_ENABLED */
+
+
typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
typedef void (*RelSyncCallbackFunction) (Datum arg, Oid relid);