Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x3O7A-006OCY-2e for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2026 01:25:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x3O78-00GCJY-1e for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2026 01:25:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x3O78-00GCJP-0f for pgsql-hackers@lists.postgresql.org; Mon, 07 Sep 2026 01:25:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x3O75-00000003KDx-2Agh for pgsql-hackers@lists.postgresql.org; Mon, 07 Sep 2026 01:25:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6871PYke149284; Sun, 6 Sep 2026 21:25:34 -0400 From: Tom Lane To: Michael Paquier cc: Postgres hackers Subject: Re: Remove toast_max_chunk_size from control file In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Mon, 07 Sep 2026 10:18:38 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <149282.1788744334.1@sss.pgh.pa.us> Date: Sun, 06 Sep 2026 21:25:34 -0400 Message-ID: <149283.1788744334@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > My main argument regarding the removal of toast_max_chunk_size in the > control file is that it is a redundant check, due to the fact that the > definition of TOAST_OID_MAX_CHUNK_SIZE is tied to two fields that we > already track in the control file: > - BLCKSZ > - MAXALIGN I don't think this follows. heaptoast.h says: #define EXTERN_TUPLES_PER_PAGE 4 /* tweak only this */ #define EXTERN_TUPLE_MAX_SIZE MaximumBytesPerTuple(EXTERN_TUPLES_PER_PAGE) #define TOAST_MAX_CHUNK_SIZE \ (EXTERN_TUPLE_MAX_SIZE - \ MAXALIGN(SizeofHeapTupleHeader) - \ sizeof(Oid) - \ sizeof(int32) - \ VARHDRSZ) EXTERN_TUPLES_PER_PAGE is a free variable here, and it's entirely possible that someone would wish to tweak it. So I disagree that it's safe to remove this value from pg_control. regards, tom lane