Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eORQM-0002LN-0B for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 16:59: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 1eORQL-00086P-G4 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 16:59:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eORQL-00086F-6k for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 16:59:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eORQI-0000n1-T4 for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 16:59:24 +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 vBBGxJjm012545; Mon, 11 Dec 2017 11:59:19 -0500 From: Tom Lane To: Tomas Vondra 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 Tomas Vondra message dated "Mon, 11 Dec 2017 17:46:43 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12543.1513011559.1@sss.pgh.pa.us> Date: Mon, 11 Dec 2017 11:59:19 -0500 Message-ID: <12544.1513011559@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > On 12/11/2017 05:27 PM, Tom Lane wrote: >> However, unless we want to run around and touch all the ~ 150 calls >> with constant arguments, we'd have to set things up so that the default >> behavior for AllocSetContextCreate is to not copy. This risks breaking >> callers in extensions. Not entirely sure if it's worth that --- any >> thoughts? > I don't think silently breaking extensions is particularly attractive > option, so I guess we'll have to run around and tweak the ~150 calls. Meh. I suppose that of the ~150 call sites, there are probably only a dozen or two where it would actually make a performance difference, so maybe this needn't be quite as invasive as I first thought. regards, tom lane