From 0c6b81dfdf91f55097edf860b0d547077ecc4615 Mon Sep 17 00:00:00 2001 From: Matthias van de Meent Date: Mon, 31 Aug 2026 22:22:45 +0200 Subject: [PATCH v1 5/5] Relcache: Use Proxy context for "index info" contexts This avoids block-based overheads and allows the use of the system allocator, which frequently has slightly better memory performance/ efficiency for longer-lived allocations. --- src/backend/utils/cache/relcache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 0d6badb9f01..a4fa19de835 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1522,9 +1522,8 @@ RelationInitIndexAccessInfo(Relation relation) * a context, and not just a couple of pallocs, is so that we won't leak * any subsidiary info attached to fmgr lookup records. */ - indexcxt = AllocSetContextCreate(CacheMemoryContext, - "index info", - ALLOCSET_SMALL_SIZES); + indexcxt = ProxyContextCreate(CacheMemoryContext, "index info"); + relation->rd_indexcxt = indexcxt; MemoryContextCopyAndSetIdentifier(indexcxt, RelationGetRelationName(relation)); -- 2.50.1 (Apple Git-155)