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 1vhkPe-005S8n-2U for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jan 2026 08:15:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vhkPb-00C93G-1T for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jan 2026 08:14:59 +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.96) (envelope-from ) id 1vhkPa-00C938-22 for pgsql-hackers@lists.postgresql.org; Mon, 19 Jan 2026 08:14:59 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vhkPY-001Idl-1t for pgsql-hackers@lists.postgresql.org; Mon, 19 Jan 2026 08:14:58 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 610E714005B9; Mon, 19 Jan 2026 03:14:54 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Mon, 19 Jan 2026 03:14:54 -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=fm2; t=1768810494; x=1768896894; bh=Z4p0bsHjtW Tm4PqGmh/7nykNoeB1h0POA/HhhkPy4hY=; b=awnxZE2paEapIOQlyELAxSGkR1 +YTuJ3y2jeOHm43npXvILNkLJM8q3OznsX8jL65j5zOP3xBxt5pGVmy7i4c1DHKo wue5tb9S44ju0GMbQz/4E+HKysb1vkSFWoPzhnHY1J3G4AiK8a90Cvc4aZqOC4Gk W0gtWMcPVoDa2pwJru/7sO1ju4BnBae40+k3KOCVSMyv5wCjygQrcBNrKvKZz/1B WMZ6s6Fsr7dly182RijecB0qeocSPTcvXoethJkfnkXA1pSN2fsAxYSDF4ujJIWU mH8j/4TYvdoyUSrRvdKeFwBfF75jsT8DJocXMA/dPsypYjqrJejwSgGcatmA== 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=fm2; t= 1768810494; x=1768896894; bh=Z4p0bsHjtWTm4PqGmh/7nykNoeB1h0POA/H hhkPy4hY=; b=cIoxzECWvhcxbCxhRB++dietK+rDVAYu89GdkAVHeMkil+dViWB A13/7/tZMWihMCSCsHHub5LufScdc3H6jVuhlCkp6GUOVFxzWdyg9F3zNDEhlEJi AwlHnHyePHuwn3ObjB6/A2syapYKr08XwYbNVAulGXUjFRy0wUDfpd8DwBxgmxGD xNYxKpSqjU4cYyhexwSwJMJgb8d0lcbW5YVkeUY0TWZTPVGZmaeGrJuC88JmH4S0 r5KHQGji0a60Kza7Ty/KDnXDVWpWGkoOIXcq+sj5ls0fkvEmNhnVnIYNMd0bgIR9 s/6zeVJt+DAytQDLaU39jUFm6WnvQPEh+fw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddufeejtdeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgrmh himhhsvghihhesghhmrghilhdrtghomhdprhgtphhtthhopeelvghrthhhrghlihhonhei sehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhish htshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jan 2026 03:14:51 -0500 (EST) Date: Mon, 19 Jan 2026 17:14:46 +0900 From: Michael Paquier To: Sami Imseih Cc: Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL Hackers Subject: Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Pygv+12Q3n0rK3+G" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Pygv+12Q3n0rK3+G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 15, 2026 at 02:53:20PM -0600, Sami Imseih wrote: >> As far as I recall it was an >> intentional design decision, and to adjust newa->list_end in such >> scenarios we need to solve the original problem of finding an end >> location of any arbitrary expression, >=20 > I'm not sure I follow. How would we adjust newa->list_end? I may be missing something, of course, but Dmitry's message reads as follows to me: "It was a design choice to track the start and end locations because we needed that for arrays, and resetting the locations if we have Vars in the list like you are suggesting is OK by me." I am going to re-read a bit more the area and think about a couple of patterns to test, but I think that your suggested solution should be OK to disable the list squashing as you are suggesting in this case: there is nothing we can really do, and IMO that would still be OK for most users because squashing has been designed for non-Var lists as far as I know. This is a rare pattern for long lists in IN arrays, as well. I'll sleep on it for now. -- Michael --Pygv+12Q3n0rK3+G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmlt5/YACgkQnvQgOdby QH1VtRAAoG+yZK4mhc5DOXIrKsK0p1YByVNZpsCob8KjhTY+mzcjXJzCdgzfp6kU 1eju1q2sB3v+BdSdaC/iJC+2XxJb5kTE89DBBMlCZENGPjVi35TlKFMyqHGoG2lR 9ovn8QOgb2BP4cExHRn7RTeYfotXzvB0gUcgoSr1vCAsJR/MFKpTyruGb56xUs6e GenZMQ9v1Kgw43U37/zlFqhawPFBTH3+yf4hHPM87pem3bd9xEa7wOGsWYQTiEVn yFtj5S11ipIhkVpWAxTNF+n8GuOeIHgzbAxG9BmCUW+IAtIcCNNdYySMe+2F1Da3 BdmuxPClBPcr/lxi2L3WoKpyR9tC3X1yBghlHN6uKU78EWPu+y25UuHPDy0+2ijq +ai22xHHkqMECaLl2dcanHOGT1TaPvZDgaf+/RPTCe9C2VyAl8qZWjFM/St5Jv+T s9j06HGYxqQQDA4v5re5Ms6J1CM03vftFXBNc/vnmRkyfOxO+CYCKrlrvOZ44JiA jikL6HnoRGqfNJ4xS5BrTtVQLifqALcSxxnYeqwLRDSEPz0viI3IsRQjT0xAv4ET 7yIqzzCLorwZAQv7S8obz8RR8uTDoRbnH4rS0l6ntBq46fnymh4ut1Uo9ormGaqJ otrUBColudzE4vU9oZNrfHfQaCb4kRazwh550k0eQadDLhOd/Uc= =0KnE -----END PGP SIGNATURE----- --Pygv+12Q3n0rK3+G--