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 1rALl0-006DkT-W4 for pgsql-performance@arkaria.postgresql.org; Tue, 05 Dec 2023 03:05:59 +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 1rALky-001uWN-ES for pgsql-performance@arkaria.postgresql.org; Tue, 05 Dec 2023 03:05: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 1rALkw-001uWF-Hy for pgsql-performance@lists.postgresql.org; Tue, 05 Dec 2023 03:05:56 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rALkt-00A9Ou-5G for pgsql-performance@lists.postgresql.org; Tue, 05 Dec 2023 03:05:53 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D8D0F5C0209; Mon, 4 Dec 2023 22:05:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 04 Dec 2023 22:05:48 -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:sender :subject:subject:to:to; s=fm1; t=1701745548; x=1701831948; bh=3d 7RhWJR0ZofzGgi8jdi3vuZ4C/Umdq2ogl1kcqIBNU=; b=U7f233Ie5nVfdnL2rL AS0ci5U8pfSoOCcaYDfALYE93XqsWFoqBTR4Uu9vI0LAEomyd/JnKDVwf91a6qLj qFElhhedGseoipLO68xz5Y2ExE4otjFWJOTPy40pN27EnfLjtdHjPLtKHzi18p+i ptLxmKCabVG3/v5xgDWj4oo8Av2O2GxzsY3yc0HdIly9ZRVJIpX12SOiKFmbEhEa 92KJjQvpcwRgCdq5U8Giib/p0fOCHIy5xN5Y6W1z+R5bG6hzavw8VuTcQw46HJrT xL69LG/9yHQRFJWEjKVz7dsWFZ+PvHWirKEb+NDW+r4p+crEdAPHDW0yKFNpwg9f R84Q== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701745548; x=1701831948; bh=3d7RhWJR0Zofz Ggi8jdi3vuZ4C/Umdq2ogl1kcqIBNU=; b=0kDpP/lnTO71dJL9pVZxGJ4+i6Zbj cwcuYceofiUvayut1i23zW03Wzz3v+sJSMg39aDs6fpNHDRS2gln7AYGnwC0DC6K McR6cODUh2CfY2QdR2954ubnwdFNiGGfexoSR6jrNg2Hm6FZKtdaRat2W0hWwfT1 Wxd5GyI4RMNc1T/YobIvMTCC0bNvqMUsHdjMK38fFifLysfSZQ0RWozZ2NSN7PcI gQfCM8AAlNf160SFHWeNWUJwxeO72fLjjL8WxC+Y8z4ZS5g9Snk/PPsTYF92ap83 BK4rJ7PwPFAKw09l2bziZuvpDw2UdEuRUhwDmS3ZDnl2Kf1KGTPLVtqLw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejjedgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Dec 2023 22:05:46 -0500 (EST) Date: Tue, 5 Dec 2023 12:05:26 +0900 From: Michael Paquier To: Tom Lane Cc: Jerry Brenner , pgsql-performance@lists.postgresql.org Subject: Re: Does Postgres have consistent identifiers (plan hash value) for explain plans? Message-ID: References: <756532.1701701844@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kZaPKwZswN3S28D7" Content-Disposition: inline In-Reply-To: <756532.1701701844@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --kZaPKwZswN3S28D7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 04, 2023 at 09:57:24AM -0500, Tom Lane wrote: > Jerry Brenner writes: >> Both Oracle and SQL Server have >> consistent hash values for query plans and that makes it easy to identify >> when there are multiple plans for the same query. Does that concept exi= st >> in later releases of Postgres (and is the value stored in the json expla= in >> plan)? >=20 > No, there's no support currently for obtaining a hash value that's > associated with a plan rather than an input query tree. PlannerGlobal includes a no_query_jumble that gets inherited by all its lower-level nodes, so adding support for hashes compiled from these node structures would not be that complicated. My point is that the basic infrastructure is in place in the tree to be able to do that, and it should not be a problem to even publish the compiled hashes in EXPLAIN outputs, behind an option of course. -- Michael --kZaPKwZswN3S28D7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVuk3YACgkQnvQgOdby QH2/WQ//doD4zPgzXZpXUsMJLFkSSCh+FclSMXT3q3xBX9EPzAGrrG3rIcpgD2pL HDupFenoWQ+lE1XUm3pcapDLYQW6Ze/Ez4KzG7LDoGRQmPstPllaNVkLmKoN2BXg R+9M00haNixxONfVHX9KPyObyXkMCqsPYq8FyOATfuByTEPNDgr0+pmqGrZVUDlg pHkiMNx4GjrzASrXgzPy9JUXHMxpuxQK/wLqErHSj5Lv9nJbI+CBMXKdvmG6PL1i +HTJXVDFZnJbapEgLtrAa2w5bzpSi+eCMd5CInq9RBG0I82Je7SqnHhj0hk1dW6s ogRjwdJLOj1Y31x7kDc+eeFopXY+KuCC7rt2XcAU1OrwhRB+9PGYnPUt5insLzXe 6umLiN8VxSHvVxO+CpceLPlsQZUd0b3u8Tkh/pjryT8tsngojpjvmj/qlyuH2gea 6z9ivTkBB/Dc4xIQtKciJrvzf85jTPNatigVhwyqh5yGja2TaJRuDdvaGbmedy0d LIs3rStNptDcKZUdiHT8joquejIe41On4OXDSHj4Kx0mXazVduiW0/7QTTsfbxS8 /sGhmwLeqcdzRkgUJAAwwcO2jKBPfc/qGeieXiMDO1Bo9EWWgqvbGZwl7k850pZQ vAorxJ3ZMUlGKQZJ9EDM3ynDiDDmWlpZCjnq6OexPo0DKUqsdDw= =yrEz -----END PGP SIGNATURE----- --kZaPKwZswN3S28D7--