Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkfBF-0000By-1j for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Jan 2019 01:12:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gkfBD-0004Qn-JP for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Jan 2019 01:12:11 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkfBC-0004Qg-Qk for pgsql-hackers@lists.postgresql.org; Sat, 19 Jan 2019 01:12:11 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkfB9-0000Lp-Eo for pgsql-hackers@lists.postgresql.org; Sat, 19 Jan 2019 01:12:10 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4A4CE28F4E; Fri, 18 Jan 2019 20:12:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 18 Jan 2019 20:12:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=uuTtvi6qhaq7BWAdxeIWFvBVl4y hmRdoce7J8Pv5eR4=; b=bkB2sZSPqf0K2Ta9coDzNlsugS8Y5jjCIjLJqI839fR ZLnxKibx0vLhyzX9Q+FikG5eWh5CQ45YG2gu2GbQql2HTSh0XX+qaiWcqyXeW9Uv T4QdREU7ye8M+OSGcZ+1LPA4K8HNmtDqdwr7dckBBiqWtrds0z6yo1zCpz6vSTRE eD/rOscZRwyFnhQNxRSjHzI79a9RX5Mf7xblWhMPhmfqNhgTtT2bLse3XvzXr3Q9 s9886MOErjbIdzFrsU8OA90P2TA2IB7IRXVALZTcfaWY/BFZSUmkLtDxS0cqApIp wJ8bruZaYZQ2FuUppJrlA3KfoUIFML3oMKrcA5r5Gvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uuTtvi 6qhaq7BWAdxeIWFvBVl4yhmRdoce7J8Pv5eR4=; b=D+Qcfz1vNZgqTT5DPAf6Oq hb+9X97FUxYfY+wy41jLt2EtKTWkV8Wc8XB5NvBH/0oFsuzM5YfCCJHyRaen/Wza HvJrcv4zecllYve2FutZxDBCEzdTjbi3W8ZygIlYBXIZg32xIWcHx0Mh7dx1k6kV 7lE7n4qrDTuBIjR7AVuSItIq4uD75fOtS+qkPFhuq6gy9ChpKhoiBETu6Sra+Skq LN3PytuFWiM9LMG8+1NLihXl++A5XOVUapbPLrmjiLgISuYRPO1414rR6betJutQ W9mcQs9FYIjNDGiUCNVAmNf7/gL0jU6jgsbLUgwRUkWjdZH2tihMnHB9K34w6Xog == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrhedugdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghh rggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenuc fkphepuddukedrvdeguddrvdehtddrudehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehm ihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1fa0f.ap.nuro.jp [118.241.250.15]) by mail.messagingengine.com (Postfix) with ESMTPA id 51D73E425A; Fri, 18 Jan 2019 20:12:03 -0500 (EST) Date: Sat, 19 Jan 2019 10:12:00 +0900 From: Michael Paquier To: Tom Lane Cc: Robert Haas , PostgreSQL Hackers Subject: Re: pgsql: Restrict the use of temporary namespace in two-phase transaction Message-ID: <20190119011200.GA3306@paquier.xyz> References: <20190118005949.GD1883@paquier.xyz> <25291.1547773687@sss.pgh.pa.us> <499.1547843670@sss.pgh.pa.us> <20190119000827.GB2660@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20190119000827.GB2660@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 19, 2019 at 09:08:27AM +0900, Michael Paquier wrote: > On Fri, Jan 18, 2019 at 03:34:30PM -0500, Tom Lane wrote: >> Seems hard to avoid. We could conceivably make it return "pg_temp" >> for the temp schema instead of the schema's actual name, but it's >> not very hard to think of ways whereby that would make use of the >> result fail in contexts where it previously worked. >=20 > CREATE EXTENSION is one such case. It would not work if referring to > the synonym pg_temp, but it can work if using directly the temporary > namespace of the session. So I feel that changing such things is > prone to break more things than to actually fix things. As long as I don't forget about it.. current_schema() is classified as stable, so it's not like we can make it return pg_temp and then the real temporary schema name within the same transaction... -- Michael --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxCeWAACgkQnvQgOdby QH0Low//VReO9BvtW4bLA016LS6yumf4TaNscszPxbr+9dLRECaE26LBJh+LSR+8 jviehbaUXira6DASz7/x/gWMbqOzYAmSvgVl5mwkoJmLNNkjkrsKSn60c5oVL9TB 8RhTXa/Qm2yocT5iPXyk0IDUlw3s2WOh5vXYqD36S9Q+Hc4a2Y0dvb4gkPoaZSbA 8Z/sbHFvqB5JyOJH93rnxElxl2cR1TGQKZ7HItIoQgE6DPQX6Si8C9pag2zPyeV1 FYeZQpigeURR5V6s3VZKTyU+wl/UuE/wEo/XJDMHu1y1/oBPAt/5ZKpUXQhdoXfc rbcRGu9CIFqFSzv+MSxlS5s2QeHajqa3Posng8ebv6fPmwRnT7K6riGm5PxNmkBv fWy/dyafT5mEknk0rPoUucln7IRH2jBTqXjdBQOX7daPWUbX6riPpyaElhXyeAVg AbmF6C8bnkMdHAhylMxLvTNFZTwbgh3opLdPn0FX7+WBVkTbbgSuQHyoq7vPpK1s mJPsdeCA8E17XZjXteQR4UMMB9rLqkY/B4UNjEYemViyooR+vLt+R21whrlRzgcf rH/FTceQXZEJN7lGS7qPwRUUhFBaBMg7mDUuXHhvHzwqCX/0NanzFg8uH8Cee2iU 3bHGP4pcN+LKoF4T65hkKdTkDjfT+ullbiuXYRhUchyjoywFxBw= =PhiT -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--