Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVSin-00H33i-7t for pgsql-general@arkaria.postgresql.org; Thu, 01 Feb 2024 08:46:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rVSim-002or1-2f for pgsql-general@arkaria.postgresql.org; Thu, 01 Feb 2024 08:46:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVSil-002oqs-OS for pgsql-general@lists.postgresql.org; Thu, 01 Feb 2024 08:46:55 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVSij-004rtD-83 for pgsql-general@lists.postgresql.org; Thu, 01 Feb 2024 08:46:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EA4505C015E; Thu, 1 Feb 2024 03:46:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 01 Feb 2024 03:46:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1706777210; x=1706863610; bh=6AkM+S7VK+ 5vBhWucG317pE4j2IXPrjXKcK2FPtMkaw=; b=kfqQRms6aqsb46iO2xDCBrimAi rZgr1KEw1375faDi46ya1OkfEZHHUnWKtq1BAvLpJpWBLJpM8pQn5JJluPadiAhO x8Syatbexfb2VC/3Q3O1RwlmuNhjCbvpOKUwphxqCHkh4d93X0Kj9j25DFxXv12n o4JM9iYXO3cceIZSJJlDG6D52L1OxIMB65ADsbRR79VtoJYjTa48s19treBwaFND 0HL86q08/aw7NZK9+NxO4Jg1z4m/r0vMGu5BkUld26VATXdXPmM59hXzOIzDyZa+ arIU829a1Ffj7FUJYxknZx/b1C7RPyeEKe8K52O4q1HZd9sVcfDiT2woGkGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706777210; x=1706863610; bh=6AkM+S7VK+5vBhWucG317pE4j2IX PrjXKcK2FPtMkaw=; b=su3z5C7zrOErSa7Qm2EXUSsOLdpnxsSWAuSYY9mnxcc5 3cPtnd3eA0QqHdIIINj1FodC/SYImBqH1Jq6nBNm8dTVi3iOc45GxhOaaPFIg2qh T482ydpMDsUQk8kq/9cMQ2unsMiXwkY8GwYvYCWgWVFaNE+fV8k058XkZHEelJhl MrjASkUqoVbl4Rgmfd1u5DlvfGDVslg1i+dUWaO5nN5lVWcf4pNhCIBGRXg7eORt 61qyhl6Hzqwp1fMEp2w2B1UhKDEeSSvos0vvGPt4rwvPw8HfJG4oKS2xBurOJGIO p9PRZ3IUo37AZjKsEprQ/4IsYsMY3F3cztZw+/p2SQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedutddguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepff fhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgr qhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtth gvrhhnpeetleeifedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedv jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmih gthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Feb 2024 03:46:49 -0500 (EST) Date: Thu, 1 Feb 2024 17:46:36 +0900 From: Michael Paquier To: ma lz Cc: "pgsql-general@lists.postgresql.org" Subject: Re: support fix query_id for temp table Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kpvWAKCB5mXyl0PW" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --kpvWAKCB5mXyl0PW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 01, 2024 at 07:37:32AM +0000, ma lz wrote: > session 1: > create temp table ttt ( a int ); > insert into ttt values(3); -- query_id is XXX fr= om pg_stat_activity >=20 > session 2: > create temp table ttt ( a int ); > insert into ttt values(3); -- query_id is YYY fro= m pg_stat_activity >=20 > I know temp table has different oid, so query_id is different, is > there a way to use table name for temp table instead of oid? The CREATE TABLE statements have indeed the same query ID (in 16~), and the inserts have a different one as they touch different schemas and relations. That's quite an old problem, that depends on the RangeVar attached to an InsertStmt. I don't quite see a way to directly handle that except by using a custom implementation in query jumbling for this node and its RangeVar, so there is no "easy" way to tackle that :/ -- Michael --kpvWAKCB5mXyl0PW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmW7WmwACgkQnvQgOdby QH08gg//btjdjplQ8I6rkVQE5QymcUvz8PACCRq0sy88z+zF9Kyi6MPwwrxTpHLB QcS6wpk5P8AIT71TpW6fbcZwBoHSrojeL4pNnbJx1xFICL8QKy9+8OkpJtTncVmN tuAp9JFMPrq+Sa5Gvt+7C2/hbXzjiMjYRk0O0jtaJ47yy+I2Rnl3uQsv0vwwvmJz 4o/Pq4lJVtIAU6VNubkJWyYN7S+5NGVUyyZFOcucYpeH55BGjrtzxS2JJ2qLS9Ri 9tcEnc6O7uO2NVNcuQqT0ucJgBHYfJxBJrn80kSzclSXUp61ND22TYClhuWuxkza vjp22TwbJs+TUJwi8SFp/IwPSP7obxgVaR06fbkkIjddoBCkBUrbWqar5MWWRuXS K/41bhscyWYVHtEBCYSiXGe0nk8dgMDA342EGEZI1gBd7lDTIqida7zNNrd95ZiI IYYdTKVpdK5v7AbH10dfAr9hhcaXZBR45MoJ/z93QWLvunBotKYdLTA6PVIY8m2d pcq4B2AiupU5LdsccaYMw91LKW32Wu6VOZwS3ZHiAzqgH/D97TLZ5KRTWce9LGn0 LM0ZAc7Y0knlcEFwy750G18BIzBYGv1WuYSqkd3wbwd7PuIHRRH5fLfeTGVOJduD p7+g2QNnN5WvxC/2MMtty5elbpsdexgS+93DmpCbqm7ep61ID9c= =7t34 -----END PGP SIGNATURE----- --kpvWAKCB5mXyl0PW--