From 91346d94a67f78b1540046373283bbc1bfcd30c9 Mon Sep 17 00:00:00 2001 From: Melih Mutlu Date: Thu, 31 Oct 2024 16:34:34 +0300 Subject: [PATCH v4 2/2] Adjusting cache memory context sizes --- src/backend/utils/cache/catcache.c | 6 ++++-- src/backend/utils/cache/relcache.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index db41a26a9d..0c3b85cd28 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -688,7 +688,7 @@ CreateCacheMemoryContext(void) if (!CacheMemoryContext) CacheMemoryContext = AllocSetContextCreate(TopMemoryContext, "CacheMemoryContext", - ALLOCSET_DEFAULT_SIZES); + ALLOCSET_START_SMALL_SIZES); } static void @@ -700,7 +700,9 @@ CreateCatCacheContext(void) if (!CatCacheContext) CatCacheContext = AllocSetContextCreate(CacheMemoryContext, "CatCacheContext", - ALLOCSET_DEFAULT_SIZES); + ALLOCSET_DEFAULT_MINSIZE, + 128 * 1024, + ALLOCSET_DEFAULT_MAXSIZE); } /* diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 9392060e25..2e4eb88c58 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1631,7 +1631,9 @@ CreateRelCacheContext(void) if (!RelCacheContext) RelCacheContext = AllocSetContextCreate(CacheMemoryContext, "RelCacheContext", - ALLOCSET_DEFAULT_SIZES); + ALLOCSET_DEFAULT_MINSIZE, + 128 * 1024, + ALLOCSET_DEFAULT_MAXSIZE); } /* -- 2.34.1