Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oShBO-0006IE-1n for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 16:00:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oShBN-0007yx-01 for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 16:00:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oShBM-0007yo-NK for pgsql-hackers@lists.postgresql.org; Mon, 29 Aug 2022 16:00:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oShBI-0000C6-Qo for pgsql-hackers@lists.postgresql.org; Mon, 29 Aug 2022 16:00:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27TG048C3213778; Mon, 29 Aug 2022 12:00:04 -0400 From: Tom Lane To: Andres Freund cc: Tomas Vondra , Amit Kapila , David Rowley , Robert Haas , Yura Sokolov , PostgreSQL Developers Subject: Re: Reducing the chunk header sizes on all memory context types In-reply-to: <20220829155745.kndrwz6rlktjfhqq@awork3.anarazel.de> References: <3137572.1661780863@sss.pgh.pa.us> <3205803.1661786437@sss.pgh.pa.us> <3209705.1661787794@sss.pgh.pa.us> <20220829155745.kndrwz6rlktjfhqq@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 29 Aug 2022 08:57:45 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3213776.1661788804.1@sss.pgh.pa.us> Date: Mon, 29 Aug 2022 12:00:04 -0400 Message-ID: <3213777.1661788804@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-08-29 11:43:14 -0400, Tom Lane wrote: >> I think adding a padding field to SlabBlock would be a less messy >> solution than your patch. > That just seems to invite the same problem happening again later and it's > harder to ensure that the padding is correct across platforms. Yeah, I just tried and failed to write a general padding computation --- you can't use sizeof() in the #if, which makes it a lot more fragile than I was expecting. Tomas' way is probably the best. regards, tom lane