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.96) (envelope-from ) id 1w6Ih4-004A4e-0W for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2026 01:42:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6Ih1-00DAnT-25 for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2026 01:42:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6Ih0-00DAnK-2c for pgsql-hackers@lists.postgresql.org; Sat, 28 Mar 2026 01:42:27 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w6Igz-00000001QGV-0MNq for pgsql-hackers@postgresql.org; Sat, 28 Mar 2026 01:42:26 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id C15CEEC00F3; Fri, 27 Mar 2026 21:42:23 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 27 Mar 2026 21:42:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-transfer-encoding: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=fm1; t=1774662143; x=1774748543; bh=9bT0x9zVZFsXJ1Tmee92dxF9aQPo/2olZVzz4wAeIUc=; b= qRMsTVIPx16IZNKDW+AHm0ihGgijBBbwlM1zKF+4Qu8nfjlKMV8ZmsRB4VwRqlWb PkVWCNqJ3O0EJWa+9LtD8DH448E+O7KVqG+K72YkIcz/StQtGn6XbEqdsWo/7h6C 8dpq0PfWj1zV6GNrfDpey2PPdeQ50GiCkbaU6MaJbMnhvss8j5O3FGt5BBnQrNUu EYriw/GVswHHjRHGcUk4XWEMCj0nM8zvqI2GK5dr7/rmGDRSIMkS6CSJ3sRNbhsI r83OzZuqYxeBdSeaCXnZSFENS/PCvT/b4b/DHbRqokAguldfQBg843phrF78W0+k fwUPMghyhxbGJDRcnyZsYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm1; t=1774662143; x= 1774748543; bh=9bT0x9zVZFsXJ1Tmee92dxF9aQPo/2olZVzz4wAeIUc=; b=y t9bfNdNFAEVfVlaAG4l6jgljo9xeEsWqXJxWLgwBlpxFlWVAK8prC0rVVr8fTNRD 67/DiUOC3n/5bs7/IknJ60gC+/I4hBWe8eJmxuxW8peCGztMr6diTmgp76nyonax F/COjdSrqsAKXzHspXlqhVHAQuWwPAeWtt/1xrNWKd+uo88Q2TARFEdI+AwGhJ7r osC5oCemNkK4lTlYtHgSW1j7/e4SYlbIMWsoSrHfQljQUtCtS+IHBETsUvez4IE/ 45ntcvsf0R2SUnpxWGXxBghzIFSN4h4qwOdj/z8LkidIVDtiL3CWOiq/AUnwHwTW i9pYq1+VRy/Bep+T/0zQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeffedukeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpegtgffhggfufffkfhevjgfvofesthhqmhdthhdt jeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeeufedvjeffhfejgfettefh leehkefhheeuvdegfeeiiedujefftdfhveejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii pdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeiivg hnghhmrghnsehhrghlohgusghtvggthhdrtghomhdprhgtphhtthhopehrjhhujhhuuddv feesghhmrghilhdrtghomhdprhgtphhtthhopehluhhkrghssehfihhtthhlrdgtohhmpd hrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg pdhrtghpthhtohepshgrmhhimhhsvghihhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Mar 2026 21:42:22 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Michael Paquier Mime-Version: 1.0 (1.0) Subject: Re: Refactor query normalization into core query jumbling Date: Sat, 28 Mar 2026 10:42:09 +0900 Message-Id: <8437F4D0-9DFB-4045-9318-CC3C5BA2E267@paquier.xyz> References: Cc: Lukas Fittl , zengman , pgsql-hackers , Julien Rouhaud In-Reply-To: To: Sami Imseih X-Mailer: iPhone Mail (23E246) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 28, 2026, at 2:09, Sami Imseih wrote: > I agree that ComputeConstantLengths should be in core. This one is > not a gray area IMO. The query jumble already records constant locations, > but leaves the lengths unset. ComputeConstantLengths is just the > completion of that work. There could be no other interpretation, > unlike generate_normalized_query, of what the lengths should be. This is an interesting remark. One problem with any patches presented yet is= that we don=E2=80=99t attach the lengths as part of the in-core query jumbl= ing procedure: we plug the lengths later using the same structure as the que= ry jumbling. It seems to me that this is half-baked overall. I think that we= don=E2=80=99t want to pay the extra length computation in the core query ju= mbling at the end, then why does it make sense to include the lengths in the= JumbleState structure at all? Shouldn=E2=80=99t we use a different structur= e filled inside PGSS for this purpose rather than reuse the same thing for P= GSS and the in-core part (don=E2=80=99t have the code in front of me now). -- Michael