9797#define MAYBE_RECOVER_RELATION_BUILD_MEMORY 1
9898#else
9999#define RECOVER_RELATION_BUILD_MEMORY 0
100- #ifdef CLOBBER_CACHE_ENABLED
100+ #ifdef DISCARD_CACHES_ENABLED
101101#define MAYBE_RECOVER_RELATION_BUILD_MEMORY 1
102102#endif
103103#endif
@@ -1011,10 +1011,10 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
10111011 * data, reasoning that the caller's context is at worst of transaction
10121012 * scope, and relcache loads shouldn't happen so often that it's essential
10131013 * to recover transient data before end of statement/transaction. However
1014- * that's definitely not true in clobber-cache test builds , and perhaps
1015- * it's not true in other cases.
1014+ * that's definitely not true when debug_discard_caches is active , and
1015+ * perhaps it's not true in other cases.
10161016 *
1017- * When cache clobbering is enabled or when forced to by
1017+ * When debug_discard_caches is active or when forced to by
10181018 * RECOVER_RELATION_BUILD_MEMORY=1, arrange to allocate the junk in a
10191019 * temporary context that we'll free before returning. Make it a child of
10201020 * caller's context so that it will get cleaned up appropriately if we
@@ -1024,7 +1024,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
10241024 MemoryContext tmpcxt = NULL ;
10251025 MemoryContext oldcxt = NULL ;
10261026
1027- if (RECOVER_RELATION_BUILD_MEMORY || debug_invalidate_system_caches_always > 0 )
1027+ if (RECOVER_RELATION_BUILD_MEMORY || debug_discard_caches > 0 )
10281028 {
10291029 tmpcxt = AllocSetContextCreate (CurrentMemoryContext ,
10301030 "RelationBuildDesc workspace" ,
@@ -1627,11 +1627,10 @@ LookupOpclassInfo(Oid operatorClassOid,
16271627 * otherwise. However it can be helpful for detecting bugs in the cache
16281628 * loading logic itself, such as reliance on a non-nailed index. Given
16291629 * the limited use-case and the fact that this adds a great deal of
1630- * expense, we enable it only for high values of
1631- * debug_invalidate_system_caches_always.
1630+ * expense, we enable it only for high values of debug_discard_caches.
16321631 */
1633- #ifdef CLOBBER_CACHE_ENABLED
1634- if (debug_invalidate_system_caches_always > 2 )
1632+ #ifdef DISCARD_CACHES_ENABLED
1633+ if (debug_discard_caches > 2 )
16351634 opcentry -> valid = false;
16361635#endif
16371636
0 commit comments