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 1w7MPl-005DjQ-0e for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 23:53:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7MPi-007BK1-1s for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 23:52:59 +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 1w7MPh-007BJs-2K for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 23:52:58 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7MPg-00000001stw-0NOX for pgsql-hackers@postgresql.org; Mon, 30 Mar 2026 23:52:57 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfout.stl.internal (Postfix) with ESMTP id 4B57C1D00129; Mon, 30 Mar 2026 19:52:54 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Mon, 30 Mar 2026 19:52:54 -0400 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=fm1; t=1774914774; x=1775001174; bh=gMNPAsKyUe xKeHlkINtOkTncbwXoHkKB3NMW2Gwnp9A=; b=U6DxopGfeflMeWnHIG/ySa1puT sH9W0cmrcBxSuVDgq+K9swkfHpK6FNdrPkyDKQn93GcjKn1NSti830bVrwJ9dWAp ThD4UJU1wYh1B039ikRslf6ty1jjEBv/Ku+PV+HGpCIUlhiOll+4RSSR/G57kvse /Mblq4divceVbu6uejfjYXcOGgKtL7fOwj1A5CoJKhL1BWGup1whCvBbCK+yMy9Z aTVLbHKu5grvpPAT1oKFXkQUR8mCAxEWsM7sCJcORYt9/l4Y4QDC5f76F1mwhCux 96luF95zhdnKpCHHJwKPK4Rv4mjn0/UMZVz4r8YlZ90co0OUf4gmTMUxu1rQ== 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=fm1; t= 1774914774; x=1775001174; bh=gMNPAsKyUexKeHlkINtOkTncbwXoHkKB3NM W2Gwnp9A=; b=VzH4tT0s1rzFsVQQwUAIFUBtj4BbGBNJ/910QWQakAV56oSsN8b g1kETr3SALqsFyNEdUR9dAIpxagc80QxqmsczmZh4JXD+ippYWKNyxQeO3vobPIo TjK5XAfzi/S/06avG5t+M6I3mJxRoZroHdfCziCPK+3k29spT1/i3eO+0U5869yR OOJTuZqfdaOLO/Or8yQcVxLzjawT5bspmVWnjEMwhPsjdV712x/MUXBN9GMYmrik d+0UsdBz65IAcWWuKmkEiNJwUvAUUFRvGPYhgH0Zu+PBiBXV4c1zRjs+WM6csDRC 2L0tLVNx2w3diKAcbEXvGAXfBNolDB1t5tA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefgedtfeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgrmh himhhsvghihhesghhmrghilhdrtghomhdprhgtphhtthhopehluhhkrghssehfihhtthhl rdgtohhmpdhrtghpthhtohepiigvnhhgmhgrnheshhgrlhhouggsthgvtghhrdgtohhmpd hrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg pdhrtghpthhtoheprhhjuhhjuhduvdefsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Mar 2026 19:52:51 -0400 (EDT) Date: Tue, 31 Mar 2026 08:52:46 +0900 From: Michael Paquier To: Sami Imseih Cc: Lukas Fittl , zengman , pgsql-hackers , Julien Rouhaud Subject: Re: Refactor query normalization into core query jumbling Message-ID: References: <8437F4D0-9DFB-4045-9318-CC3C5BA2E267@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hBwvhcidlWe+Ao/0" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hBwvhcidlWe+Ao/0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 30, 2026 at 02:20:47PM -0500, Sami Imseih wrote: >> I see where you're coming from on that, but I don't think we can >> remove anything here in practice: >=20 > Yes. Not unless we want to rely on the parser to track the lengths in > Const, which could be invasive, but I have not looked into it. Hmm. We may not want to get down to that, still that would be cheaper than reprocessing the parsing of the query string twice.=20 >> I still think it'd be reasonable for us to include >> ComputeConstantLengths in core to complete the picture of what we're >> doing with _jumbleElements and the length field already anyway. Its >> basically a way to fully hydrate the partially filled out JumbleState >> from the initial jumble. >=20 > I fully agree, ComputeConstantLengths is an optional post-jumble-query st= ep > for a consumer that wishes to calculate the lengths. The length calculati= on > is not unique to a plug-in, so in my mind the work it's doing is core > jumbling functionality. Okay. I could fall into that for this release. Marking the JumbleState as a const is the most important piece here. I'm +-0 regarding this routine, but I can also see your point about how it's useful to give at least the option to extensions to have a recomputation of the Const lengths, the same way as PGSS. What are the extensions that would use that? -- Michael --hBwvhcidlWe+Ao/0 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnLDM0ACgkQnvQgOdby QH3Wyg//UfkAUUQtXdE4bL4QuYPQdWUUwGqpIt7O3PjaH/U5DIO4TH/7qmGDjZdm 384izJWyfyoqiAejrVAtAPcZOFQLQPnR9w3+bkt0R2hQIfdc7gGC2B+PhEKTdsAv CoiDWoQG2YUGWfu10m8dTGloMkvEreDFdDQbaZXsie2pGsMFn3izTlO2kHlBKEOu 8MwVhirHxu3f1SIkRz0zv8d4j98ZtgL8Qp31feXjZ3+YklLIMZ6KXTWT+R9LLSxu jr/qrMYbXgNyfE0w14hKUjBoY+81OGL/B5vtGspbo7TrJw2ihT/4bwkdsrxiZt6k NWIwT37OfO/mxRA8xFx3wk3FMi/qMY4z4f6Lvw1OKxrRBRKeMkDnLeD029nFokda bz/AhNfnh50P1Mulkeo+OLNqIrBHqm4xxz7dtLhe4K9A/Ir1EYFPMaXhCk8j13Nc 36pEgBs/MEVGogRFxuE/W/jg3o9SnFkD0oQ755M9VTX2vYGtgXGnucfOH7Y/C/4U bpYlYmNwHCjLIACWm/u9db1GdBirwfRbddp7Q5EUd+QFMUbcxT4OqAO2GA93YO6h UkDVxkE/4yfT8WFAz+eHhDtcMB+ZNMhXiAuYq7iIzrQnx2tT6hDjXJiy0OuFqhS9 tihtNHD0pOe08+gpWL6YpM6AV8sJh+YazzXFDJ5X/y2KVJp0WpE= =Z5E0 -----END PGP SIGNATURE----- --hBwvhcidlWe+Ao/0--