Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfBng-0008Jm-9f for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Aug 2017 21:12:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dfBne-00068f-7a for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Aug 2017 21:12: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 1dfBnc-00068T-PB for pgsql-bugs@postgresql.org; Tue, 08 Aug 2017 21:12:24 +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.84_2) (envelope-from ) id 1dfBnZ-0004Pt-2u for pgsql-bugs@postgresql.org; Tue, 08 Aug 2017 21:12: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 v78LCEYb017592; Tue, 8 Aug 2017 17:12:14 -0400 From: Tom Lane To: Andres Freund cc: Rick Otten , ronan.dunklau@dalibo.com, PostgreSQL mailing lists , Amit Kapila , Robert Haas Subject: Re: your mail In-reply-to: <20170808201838.vt5lyujd3fvgtxyq@alap3.anarazel.de> References: <20170808194943.smet3uuvtxats44v@alap3.anarazel.de> <15541.1502223315@sss.pgh.pa.us> <20170808201838.vt5lyujd3fvgtxyq@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 08 Aug 2017 13:18:38 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17590.1502226734.1@sss.pgh.pa.us> Date: Tue, 08 Aug 2017 17:12:14 -0400 Message-ID: <17591.1502226734@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund writes: > On 2017-08-08 16:15:15 -0400, Tom Lane wrote: >> I don't see much of a way to do that in the "typical" case where >> the library load happens as a result of a SQL command. You can't >> just say "oh, we're not in a transaction" and then later "wait, >> yes we are". > Transaction seems hard, but setting CurrentMemoryContext = NULL during > library load seems quite possible. And that'll cause a lot of code that > assumes an in-progress transaction to fail. And it would cause a lot of code that *doesn't* assume that to fail, too. That has basically nothing to do with not being in a transaction, so I don't think it would be helpful here. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs