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 1oLUnk-0005Lq-Lf for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Aug 2022 19:22:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLUnj-0007Fn-H5 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Aug 2022 19:22:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLUnj-0007Fd-7X for pgsql-hackers@lists.postgresql.org; Tue, 09 Aug 2022 19:22:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLUnh-0005mC-7a for pgsql-hackers@lists.postgresql.org; Tue, 09 Aug 2022 19:22:02 +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 279JLvwq036082; Tue, 9 Aug 2022 15:21:57 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , David Rowley , Yura Sokolov , PostgreSQL Developers Subject: Re: Reducing the chunk header sizes on all memory context types In-reply-to: <20220809184410.g6yzu6pvttuphag5@awork3.anarazel.de> References: <9dec1bd42fed3e263de294116380e5b51c427267.camel@postgrespro.ru> <20220712174404.polbc5it7j6mzmql@awork3.anarazel.de> <20220809184410.g6yzu6pvttuphag5@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 09 Aug 2022 11:44:10 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <36080.1660072917.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 09 Aug 2022 15:21:57 -0400 Message-ID: <36081.1660072917@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > I think it's fine, given that we can change this at any time, but it's > probably worth to explicitly agree that this will for now restrict us to= 8 > context methods? Do we really need it to be that tight? I know we only have 3 methods toda= y, but 8 doesn't seem that far away. If there were six bits reserved for this I'd be happier. >> # We also add a restriction that block sizes for all 3 of the memory >> # allocators cannot be 1GB or larger. We would be unable to store the >> # number of bytes that the block is offset from the chunk stored beyond= this >> #1GB boundary on any block that was larger than 1GB. Losing MemoryContextAllocHuge would be very bad, so I assume this comment is not telling the full truth. regards, tom lane