From d68a00391214be2020e49be4b55f761d47a5c229 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 13 Jul 2021 15:01:01 -0400 Subject: Rename debug_invalidate_system_caches_always to debug_discard_caches. The name introduced by commit 4656e3d66 was agreed to be unreasonably long. To match this change, rename initdb's recently-added --clobber-cache option to --discard-caches. Discussion: https://postgr.es/m/1374320.1625430433@sss.pgh.pa.us --- src/include/pg_config_manual.h | 26 +++++++++++++------------- src/include/utils/inval.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/include') diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 27da86e5e09..614035e2159 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -322,36 +322,36 @@ /* #define RANDOMIZE_ALLOCATED_MEMORY */ /* - * For cache invalidation debugging, define CLOBBER_CACHE_ENABLED to enable - * use of the debug_invalidate_system_caches_always GUC to aggressively flush - * syscache/relcache entries whenever it's possible to deliver invalidations. - * See AcceptInvalidationMessages() in src/backend/utils/cache/inval.c for + * For cache-invalidation debugging, define DISCARD_CACHES_ENABLED to enable + * use of the debug_discard_caches GUC to aggressively flush syscache/relcache + * entries whenever it's possible to deliver invalidations. See + * AcceptInvalidationMessages() in src/backend/utils/cache/inval.c for * details. * * USE_ASSERT_CHECKING builds default to enabling this. It's possible to use - * CLOBBER_CACHE_ENABLED without a cassert build and the implied - * CLOBBER_FREED_MEMORY and MEMORY_CONTEXT_CHECKING options but it's unlikely + * DISCARD_CACHES_ENABLED without a cassert build and the implied + * CLOBBER_FREED_MEMORY and MEMORY_CONTEXT_CHECKING options, but it's unlikely * to be as effective at identifying problems. */ -/* #define CLOBBER_CACHE_ENABLED */ +/* #define DISCARD_CACHES_ENABLED */ -#if defined(USE_ASSERT_CHECKING) && !defined(CLOBBER_CACHE_ENABLED) -#define CLOBBER_CACHE_ENABLED +#if defined(USE_ASSERT_CHECKING) && !defined(DISCARD_CACHES_ENABLED) +#define DISCARD_CACHES_ENABLED #endif /* - * Backwards compatibility for the older compile-time-only cache clobber + * Backwards compatibility for the older compile-time-only clobber-cache * macros. */ -#if !defined(CLOBBER_CACHE_ENABLED) && (defined(CLOBBER_CACHE_ALWAYS) || defined(CLOBBER_CACHE_RECURSIVELY)) -#define CLOBBER_CACHE_ENABLED +#if !defined(DISCARD_CACHES_ENABLED) && (defined(CLOBBER_CACHE_ALWAYS) || defined(CLOBBER_CACHE_RECURSIVELY)) +#define DISCARD_CACHES_ENABLED #endif /* * Recover memory used for relcache entries when invalidated. See * RelationBuildDescr() in src/backend/utils/cache/relcache.c. * - * This is active automatically for clobber cache builds when clobbering is + * This is active automatically for clobber-cache builds when clobbering is * active, but can be overridden here by explicitly defining * RECOVER_RELATION_BUILD_MEMORY. Define to 1 to always free relation cache * memory even when clobber is off, or to 0 to never free relation cache diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index a7e04722d01..770672890b0 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -18,7 +18,7 @@ #include "storage/relfilenode.h" #include "utils/relcache.h" -extern PGDLLIMPORT int debug_invalidate_system_caches_always; +extern PGDLLIMPORT int debug_discard_caches; typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue); typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid); -- cgit v1.2.3