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 1thIYD-000t3M-3j for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 01:25:29 +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 1thIYB-000bDL-SW for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2025 01:25:27 +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 1thIYA-000bDD-QG for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2025 01:25:27 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1thIY6-004r4D-2g for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2025 01:25:26 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 2F4991140181; Sun, 9 Feb 2025 20:25:21 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sun, 09 Feb 2025 20:25:21 -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=1739150721; x=1739237121; bh=8LTuO9oTGF RmtCchVzHu+ygw/ksSLMBg/0xhyWsaKPU=; b=OOfcQKaQ1ufDVQg0HDzIP/IBGF hsw9+2LUHO8VKwAdzImHcyDEAol3QhGcczRB2f/KfCV0Fnbrh8hxZz/UkcwsSAgA kNSmMSP2b1TeqJEPbRqYUWWNI/KeEQjTp91tjMQNZVmMOMYg2/RwbemFVSHCbBYo mTf9MatNeWKcuxl0wCWsy/Y2hOkqM2xizJGU8vTyECNeersIsMN/hb5ml+PS6hAX 3Tpthr8f8MPFWp88Jj9zMHyZ1Jcn5P+HJLk2Emy6J/9w6QploYLp04RcU5hefOCJ BXhDxLv0ue4olMz97bvGkhJrdTGz3Bz+vJTKx79KdDbA8jg2YAKhxwMC/L1A== 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-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1739150721; x=1739237121; bh=8LTuO9oTGFRmtCchVzHu+ygw/ksSLMBg/0x hyWsaKPU=; b=LXUMmOJDWOeV6XREFqt0pZU53UGtlTfv4D6ZLf/COG2LGesMqzI LeOKC0yqIV16fgk5HnNcclX3fCwhy5MGOqKFFxl9RnBEBrplLKvRHBthSIWPnH+6 GnE62lPMra+XJweqKzlsw63Vkh4dwt4b02yuLowaGSSCNKm74yNzryamENz9kCT8 5WDavuIs0F2kRCycHO/MXrCGi0t6JzXyBdWYtPwWl//DfBTIpEsgyYfiAnB9hWz5 YLe2D4vb/8MHU143Pc9IrUHxyqnjzNYZfMmRTJvARfOOf0jzow579YUNIeu3G30F NygLz7VT7sO5hbEckBJXh0RGYF7RlU7cK8Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefieejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffk fhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrh cuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeet leeifedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghl sehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehsrghmihhmshgvihhhsehgmhgrihhlrdgtohhmpdhrtghpthht oheplhhukhgrshesfhhithhtlhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkh gvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehmrghr khhosehpghgrnhgrlhihiigvrdgtohhm X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Feb 2025 20:25:18 -0500 (EST) Date: Mon, 10 Feb 2025 10:25:05 +0900 From: Michael Paquier To: Sami Imseih Cc: Lukas Fittl , PostgreSQL Hackers , Marko M Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="axjwv/aSxA6msmsa" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --axjwv/aSxA6msmsa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 06, 2025 at 07:52:53PM -0600, Sami Imseih wrote: > This fixes the long comments in plannodes.h to make it easier to add the > attribute annotation. It made the most sense to make this the first patch > in the set. A commit that happened last Friday made also this to have conflict. > Done. Also rewrote the header comment in jumblefuncs.c to describe > a more generic node jumbling mechanism that this file now offers. > > Yes, after getting my hands on this, I agree with you. It made more sense > to keep all the jumbling work in jumblefuncs.c -static void AppendJumble(JumbleState *jstate, - const unsigned char *item, Size size I don't understand why there is a need for publishing AppendJumble() while it remains statis in jumblefuncs.c. This is not needed in 0003 and 0004, either. Should we use more generic names for the existing custom_query_jumble, no_query_jumble, query_jumble_ignore and query_jumble_location? Last time I've talked about that with Peter E, "jumble" felt too generic, so perhaps we're looking for a completely new term? This impacts as well the naming of the existing queryjumblefuncs.c. The simplest term that may be possible here is "hash", actually, because that's what we are doing with all these node structures? That's also a very generic term. The concept of location does not apply to plans, based on the current proposal, so perhaps we should talk about "query normalization location"? Point is that query_jumble_ignore is used in the planner nodes, which feels inconsistent, so perhaps we could rename query_jumble_ignore and no_query_jumble to "hash_ignore" and/or "no_hash", or something like that? This may point towards the need of a split, not sure, still the picture is incomplete. > v5-0003 and v5-0004 introduce the planId in core and pg_stat_plans. These > needed rebasing only; but I have not yet looked at this thoroughly. >=20 > We should aim to get 0001 and 0002 committed next. Yeah. I didn't see any reasons why 0001 should not happen now, as it makes the whole easier while making the header styles a bit more consistent. Perhaps also if somebody forks the code and adds some pg_node_attr() properties? v5-0003 and v5-0004, not sure yet. The intrisincs of the planner make putting a strict definition of what a hash means hard to set down, we should work towards studying that more first. I don't see this happen until the next release freeze. -- Michael --axjwv/aSxA6msmsa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmepVXEACgkQnvQgOdby QH1Fng/8Du7zQmop7NpT7n3jcnVOQedI8UXaBagHlwI7h8UBuxqix8QZHIzJbr2b 2vdfTelftdAWYd0s/WjCJpxHkwnG6bRCbH+xsIdODLyeyLoR4Yaov8ChwoSjYzLF SsrKnfRAU1mcC5k+1JbnCw+w20kCaT134ua6w/+3i5VLH0b8Wn34QJu8tYlIYenq 2LurPxHwBvmdwdx63uY1AGjlUlA4rEJkQWeRJrPeJHC+biwpQRy0Qom67cx4ShCp 16ylNnLuqbtBcIbMysgQ19PfXmwVDgKgAEiiuJXNVxLIouFdRJp4GPvKo5V78O2q 0wGJO8l8NaSR+IF8CvB9HLZo7z5II1HlsWUPHX9hM99SzUZP6HGX4Da2AiIBRNsw xozWNHh2MWVJYDALl7x74kddh/tzHOfyw+8t4EJjc3gVYtnfVJ30YmH2jC85x7ds mSCqJ8ij3t5PkH490K2PL3U8+tI9+2XZR2G/wZNYqNsS0LLMsteW8E48q64SLaj+ WDZ9rUmWM/bE/O5oJS4dHYN9kFdqQh4ozt6SuEoDK+Iz7QVacQXz40hUoyYZSrc5 xGZ+bQYQ3JMIrWg0i5CMo/5ShvlajfHyCiHlhygAmFrmwO6gySXKy+GHkzf3F3nJ vbt/hu6wouXhPgi/w07HdhZODn2fdwJzqBAc8ASSsEJmqAJOXOY= =q6K9 -----END PGP SIGNATURE----- --axjwv/aSxA6msmsa--