Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOS26-00067f-Ni for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 17:38:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOS26-0005vm-9l for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 17:38:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eOS26-0005vd-3g for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 17:38:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eOS23-0001Nw-K7 for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 17:38:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vBBHcLnS016101; Mon, 11 Dec 2017 12:38:21 -0500 From: Tom Lane To: Simon Riggs cc: pgsql-hackers@lists.postgresql.org Subject: Re: Rethinking MemoryContext creation In-reply-to: References: <2264.1512870796@sss.pgh.pa.us> <9726.1513009650@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Mon, 11 Dec 2017 17:25:21 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16099.1513013901.1@sss.pgh.pa.us> Date: Mon, 11 Dec 2017 12:38:21 -0500 Message-ID: <16100.1513013901@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Simon Riggs writes: > On 11 December 2017 at 16:27, Tom Lane wrote: >> For a *very* large majority of the callers of AllocSetContextCreate, >> the context name is a simple C string constant, so we could just store >> the pointer to it and save the space and cycles required to copy it. > Why have the string at all in that case? Try reading a MemoryContextStats dump without it ... regards, tom lane