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 1mcToh-0001di-AS for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Oct 2021 14:40:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcTof-0001FX-5W for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Oct 2021 14:40:41 +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 1mcToe-0001FO-SG for pgsql-bugs@lists.postgresql.org; Mon, 18 Oct 2021 14:40:40 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcToc-0005hs-Ex for pgsql-bugs@postgresql.org; Mon, 18 Oct 2021 14:40:39 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E81245C01A8; Mon, 18 Oct 2021 10:40:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 18 Oct 2021 10:40:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=hSOnqgkN/8CCkPSYsddMiTU06RJtdY67CUIwDl8dwl4=; b=eqpNuQ07 IeLU8+z0NwB9a58caNEIVHDHhhgjDFHY2pFLKVn68TcF7nPXMl4IAc0p2RVjSV+w hq3E5ODQCTtTB7TrMiq6rjqD8iwdzlZHQX8eBk69n1oXaaLcLAexmsVqhe0rJJof UIqPbp1Hr52GERfiNIFahBbA005MgUPovQoaOe5ThzoXMU0bYPbo9RTFJ6mHd3Ec GnHBTg3U/jYoCXv5ZwdNnEPBvPz6pykCWJonbc8HLN8TnWZzfqjVFJMDLblWQcKD e0NsoMa6dA/LJ+mccGam0i6QgJ8WSWnmo7vPZBVPDYOwhEBjDSl7EbJxFMu0bHGW y7slrcTDA3o5aA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvtddgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Oct 2021 10:40:37 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 215E72A06AD; Mon, 18 Oct 2021 11:40:35 -0300 (-03) Date: Mon, 18 Oct 2021 11:40:35 -0300 From: Alvaro Herrera To: Heikki Linnakangas Cc: Pg Bugs , Andrew B Subject: Re: Snapshot leak warning with lo_export in subtransaction Message-ID: <202110181440.fdiy6yrecsuk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Oct-18, Heikki Linnakangas wrote: > I tried that, but didn't like the result. It conflated the user-visible > INV_READ/WRITE flags with the new internal-only flag. True -- I also noticed this and had written in my earlier reply that we could perhaps define this flag internally, not exposing it to the user. But that seemed weird from the API definition perspective, so I removed that phrase before sending. > Thinking about this some more, I came up with the attached. It moves the > responsibility of registering the snapshot from inv_api.c to the caller. I like this patch much better. > With that change, there's no need for a new option to inv_open(). The > division of labor between be-fsstubs.c and inv_api.c has always been a bit > blurry, I think that this makes it slightly more clear. Agreed. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/