diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
commit | def5b065ff22a16a80084587613599fe15627213 (patch) | |
tree | 13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/utils/cache | |
parent | e6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff) | |
download | postgresql-def5b065ff22a16a80084587613599fe15627213.tar.gz postgresql-def5b065ff22a16a80084587613599fe15627213.zip |
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files".
The only change worthy of note is that pgindent messed up the formatting
of launcher.c's struct LogicalRepWorkerId, which led me to notice that
that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r-- | src/backend/utils/cache/inval.c | 35 | ||||
-rw-r--r-- | src/backend/utils/cache/plancache.c | 5 | ||||
-rw-r--r-- | src/backend/utils/cache/relcache.c | 6 | ||||
-rw-r--r-- | src/backend/utils/cache/typcache.c | 6 |
4 files changed, 27 insertions, 25 deletions
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index f54dc12b718..dcfd9e83893 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -181,7 +181,7 @@ static int numSharedInvalidMessagesArray; static int maxSharedInvalidMessagesArray; /* GUC storage */ -int debug_invalidate_system_caches_always = 0; +int debug_invalidate_system_caches_always = 0; /* * Dynamically-registered callback functions. Current implementation @@ -692,26 +692,27 @@ AcceptInvalidationMessages(void) /* * Test code to force cache flushes anytime a flush could happen. * - * This helps detect intermittent faults caused by code that reads a - * cache entry and then performs an action that could invalidate the entry, - * but rarely actually does so. This can spot issues that would otherwise + * This helps detect intermittent faults caused by code that reads a cache + * entry and then performs an action that could invalidate the entry, but + * rarely actually does so. This can spot issues that would otherwise * only arise with badly timed concurrent DDL, for example. * - * The default debug_invalidate_system_caches_always = 0 does no forced cache flushes. + * The default debug_invalidate_system_caches_always = 0 does no forced + * cache flushes. * - * If used with CLOBBER_FREED_MEMORY, debug_invalidate_system_caches_always = 1 - * (CLOBBER_CACHE_ALWAYS) provides a fairly thorough test that the system - * contains no cache-flush hazards. However, it also makes the system - * unbelievably slow --- the regression tests take about 100 times longer - * than normal. + * If used with CLOBBER_FREED_MEMORY, + * debug_invalidate_system_caches_always = 1 (CLOBBER_CACHE_ALWAYS) + * provides a fairly thorough test that the system contains no cache-flush + * hazards. However, it also makes the system unbelievably slow --- the + * regression tests take about 100 times longer than normal. * - * If you're a glutton for punishment, try debug_invalidate_system_caches_always = 3 - * (CLOBBER_CACHE_RECURSIVELY). This slows things by at least a factor - * of 10000, so I wouldn't suggest trying to run the entire regression - * tests that way. It's useful to try a few simple tests, to make sure - * that cache reload isn't subject to internal cache-flush hazards, but - * after you've done a few thousand recursive reloads it's unlikely - * you'll learn more. + * If you're a glutton for punishment, try + * debug_invalidate_system_caches_always = 3 (CLOBBER_CACHE_RECURSIVELY). + * This slows things by at least a factor of 10000, so I wouldn't suggest + * trying to run the entire regression tests that way. It's useful to try + * a few simple tests, to make sure that cache reload isn't subject to + * internal cache-flush hazards, but after you've done a few thousand + * recursive reloads it's unlikely you'll learn more. */ #ifdef CLOBBER_CACHE_ENABLED { diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index 1a0950489d7..07b01451327 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -897,8 +897,9 @@ BuildCachedPlan(CachedPlanSource *plansource, List *qlist, * rejected a generic plan, it's possible to reach here with is_valid * false due to an invalidation while making the generic plan. In theory * the invalidation must be a false positive, perhaps a consequence of an - * sinval reset event or the debug_invalidate_system_caches_always code. But for - * safety, let's treat it as real and redo the RevalidateCachedQuery call. + * sinval reset event or the debug_invalidate_system_caches_always code. + * But for safety, let's treat it as real and redo the + * RevalidateCachedQuery call. */ if (!plansource->is_valid) qlist = RevalidateCachedQuery(plansource, queryEnv); diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index bd88f6105ba..fd05615e769 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1016,9 +1016,9 @@ RelationBuildDesc(Oid targetRelId, bool insertIt) * * When cache clobbering is enabled or when forced to by * RECOVER_RELATION_BUILD_MEMORY=1, arrange to allocate the junk in a - * temporary context that we'll free before returning. Make it a child - * of caller's context so that it will get cleaned up appropriately if - * we error out partway through. + * temporary context that we'll free before returning. Make it a child of + * caller's context so that it will get cleaned up appropriately if we + * error out partway through. */ #ifdef MAYBE_RECOVER_RELATION_BUILD_MEMORY MemoryContext tmpcxt = NULL; diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c index 4915ef59349..35c8cf7b244 100644 --- a/src/backend/utils/cache/typcache.c +++ b/src/backend/utils/cache/typcache.c @@ -696,7 +696,7 @@ lookup_type_cache(Oid type_id, int flags) !record_fields_have_hashing(typentry)) hash_proc = InvalidOid; else if (hash_proc == F_HASH_RANGE && - !range_element_has_hashing(typentry)) + !range_element_has_hashing(typentry)) hash_proc = InvalidOid; /* @@ -742,10 +742,10 @@ lookup_type_cache(Oid type_id, int flags) !array_element_has_extended_hashing(typentry)) hash_extended_proc = InvalidOid; else if (hash_extended_proc == F_HASH_RECORD_EXTENDED && - !record_fields_have_extended_hashing(typentry)) + !record_fields_have_extended_hashing(typentry)) hash_extended_proc = InvalidOid; else if (hash_extended_proc == F_HASH_RANGE_EXTENDED && - !range_element_has_extended_hashing(typentry)) + !range_element_has_extended_hashing(typentry)) hash_extended_proc = InvalidOid; /* |