Subject: [PATCH 5/5] Adjust indentation of SearchCatCacheInternal

From: Kyotaro Horiguchi <[email-masked]>
Date: Mon, 1 Jul 2019 14:11:08 +0900

The previous patch leaves indentation of an existing code block in
SearchCatCacheInternal unchanged for diff size to be small. This
adjusts the indentation.
---
 src/backend/utils/cache/catcache.c | 82 +++++++++++++++++++-------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index b552ae960c..60d0fd28a8 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1376,59 +1376,59 @@ SearchCatCacheInternal(CatCache *cache,
 	 */
 	if (likely(catalog_cache_prune_min_age < 0))
 	{
-	dlist_foreach(iter, bucket)
-	{
-		ct = dlist_container(CatCTup, cache_elem, iter.cur);
-
-		if (ct->dead)
-			continue;			/* ignore dead entries */
-
-		if (ct->hash_value != hashValue)
-			continue;			/* quickly skip entry if wrong hash val */
-
-		if (!CatalogCacheCompareTuple(cache, nkeys, ct->keys, arguments))
-			continue;
-
-		/*
-		 * We found a match in the cache.  Move it to the front of the list
-		 * for its hashbucket, in order to speed subsequent searches.  (The
-		 * most frequently accessed elements in any hashbucket will tend to be
-		 * near the front of the hashbucket's list.)
-		 */
-		dlist_move_head(bucket, &ct->cache_elem);
-
-		/*
-		 * If it's a positive entry, bump its refcount and return it. If it's
-		 * negative, we can report failure to the caller.
-		 */
-		if (!ct->negative)
+		dlist_foreach(iter, bucket)
 		{
-			ResourceOwnerEnlargeCatCacheRefs(CurrentResourceOwner);
-			ct->refcount++;
-			ResourceOwnerRememberCatCacheRef(CurrentResourceOwner, &ct->tuple);
+			ct = dlist_container(CatCTup, cache_elem, iter.cur);
 
-			CACHE_elog(DEBUG2, "SearchCatCache(%s): found in bucket %d",
-					   cache->cc_relname, hashIndex);
+			if (ct->dead)
+				continue;			/* ignore dead entries */
+
+			if (ct->hash_value != hashValue)
+				continue;			/* quickly skip entry if wrong hash val */
+
+			if (!CatalogCacheCompareTuple(cache, nkeys, ct->keys, arguments))
+				continue;
+
+			/*
+			 * We found a match in the cache.  Move it to the front of the
+			 * list for its hashbucket, in order to speed subsequent searches.
+			 * (The most frequently accessed elements in any hashbucket will
+			 * tend to be near the front of the hashbucket's list.)
+			 */
+			dlist_move_head(bucket, &ct->cache_elem);
+
+			/*
+			 * If it's a positive entry, bump its refcount and return it. If
+			 * it's negative, we can report failure to the caller.
+			 */
+			if (!ct->negative)
+			{
+				ResourceOwnerEnlargeCatCacheRefs(CurrentResourceOwner);
+				ct->refcount++;
+				ResourceOwnerRememberCatCacheRef(CurrentResourceOwner, &ct->tuple);
+
+				CACHE_elog(DEBUG2, "SearchCatCache(%s): found in bucket %d",
+						   cache->cc_relname, hashIndex);
 
 #ifdef CATCACHE_STATS
-			cache->cc_hits++;
+				cache->cc_hits++;
 #endif
 
-			return &ct->tuple;
-		}
-		else
-		{
-			CACHE_elog(DEBUG2, "SearchCatCache(%s): found neg entry in bucket %d",
-					   cache->cc_relname, hashIndex);
+				return &ct->tuple;
+			}
+			else
+			{
+				CACHE_elog(DEBUG2, "SearchCatCache(%s): found neg entry in bucket %d",
+						   cache->cc_relname, hashIndex);
 
 #ifdef CATCACHE_STATS
-			cache->cc_neg_hits++;
+				cache->cc_neg_hits++;
 #endif
 
-			return NULL;
+				return NULL;
+			}
 		}
 	}
-	}
 	else
 	{
 		/*
-- 
2.16.3

----Next_Part(Mon_Jul_01_16_02_59_2019_106)----