From a44bb97b4a0094a6456a33eacb1d330d727390b9 Mon Sep 17 00:00:00 2001
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Date: Tue, 3 Feb 2026 13:01:12 +0000
Subject: [PATCH v1 3/3] Change StaticAssertStmt to StaticAssertDecl in aset.c

Changing the StaticAssertStmt to StaticAssertDecl and move it to file scope.
---
 src/backend/utils/mmgr/aset.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
 100.0% src/backend/utils/mmgr/

diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index ae7d1647aea..161c2e2d3df 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -87,6 +87,10 @@
 #define ALLOC_CHUNK_FRACTION	4
 /* We allow chunks to be at most 1/4 of maxBlockSize (less overhead) */
 
+/* ALLOC_CHUNK_LIMIT must be equal to ALLOCSET_SEPARATE_THRESHOLD */
+StaticAssertDecl(ALLOC_CHUNK_LIMIT == ALLOCSET_SEPARATE_THRESHOLD,
+				 "ALLOC_CHUNK_LIMIT != ALLOCSET_SEPARATE_THRESHOLD");
+
 /*--------------------
  * The first block allocated for an allocset has size initBlockSize.
  * Each time we have to allocate another block, we double the block size
@@ -501,12 +505,6 @@ AllocSetContextCreateInternal(MemoryContext parent,
 	 * requests that are all the maximum chunk size we will waste at most
 	 * 1/8th of the allocated space.
 	 *
-	 * Also, allocChunkLimit must not exceed ALLOCSET_SEPARATE_THRESHOLD.
-	 */
-	StaticAssertStmt(ALLOC_CHUNK_LIMIT == ALLOCSET_SEPARATE_THRESHOLD,
-					 "ALLOC_CHUNK_LIMIT != ALLOCSET_SEPARATE_THRESHOLD");
-
-	/*
 	 * Determine the maximum size that a chunk can be before we allocate an
 	 * entire AllocBlock dedicated for that chunk.  We set the absolute limit
 	 * of that size as ALLOC_CHUNK_LIMIT but we reduce it further so that we
-- 
2.34.1

