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 1thvNC-008cMH-4M for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Feb 2025 18:52:42 +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 1thvNA-00EI9u-SY for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Feb 2025 18:52:40 +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 1thvNA-00EI9j-Is for pgsql-hackers@lists.postgresql.org; Tue, 11 Feb 2025 18:52:40 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1thvN7-000IOg-1e for pgsql-hackers@postgresql.org; Tue, 11 Feb 2025 18:52:40 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 431D6114009E; Tue, 11 Feb 2025 13:52:36 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 11 Feb 2025 13:52:36 -0500 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1739299956; x=1739386356; bh=P WXHzT5Or3FZN2/a5KajU3mYmRuP6GzHlQTyhKMZyD0=; b=vCKRn/WmutyQxdkUA NBFDPlF490jKsDQRbiJihTUrWIzcKPX7o9zQ1RzlM4+/X4IiKyCN/FZhDxNVvyGz jh3s5aPxg9fqbTBAruzogRFlKcKliDaKyyiWS2Z+8zDdI+n4Y6BiJbNxQWKidWaQ btvzpIqbOjJ6YVb9ZkCE7hytckHt/NyWtzjT6zpcUui04xMRzh+yZBkQN3g1OlFz aXNIjYI8gwq322edXTCwAx3bQnmYVQPrusLvgFHjWXwmraTR61FoYSZo+HC7coCa sq01Ogz81R7LGsjX17SNS+L8ycpRLm+JUUXv6euDhLyg1vYjTIU8zs1sMhrPpcr+ 6zqgw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegudejjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeeutdfgffdvvefhgfeghfev jedvheetteelgeelhfduudduudevieehteegudeigfenucffohhmrghinhepphhoshhtgh hrrdgvshdpvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqd hiphdrohhrghdpnhgspghrtghpthhtohepudekpdhmohguvgepshhmthhpohhuthdprhgt phhtthhopehkohhusegtlhgvrghrqdgtohguvgdrtghomhdprhgtphhtthhopehmrghrtg hoshesfhdutddrtghomhdrsghrpdhrtghpthhtoheplegvrhhthhgrlhhiohhnieesghhm rghilhdrtghomhdprhgtphhtthhopehgvghiuggrvhdrphhgsehgmhgrihhlrdgtohhmpd hrtghpthhtohepnhgrthhhrghnuggsohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghp thhtohepphgrvhgvlhdrthhruhhkhhgrnhhovhesghhmrghilhdrtghomhdprhgtphhtth hopehrvghshhhkvghkihhrihhllhesghhmrghilhdrtghomhdprhgtphhtthhopehrohgs vghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepshgrmhhimhhsvghihh esghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Feb 2025 13:52:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1739299953; bh=FFDO8fAkYQhIeF2+Xd4G4mO8nFD5PuccrjrngmOEjLg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kyC3XgwLCqAh007sH4z3DxZJAHhnOkpQHWkv7FXzMoI0EJmPA0MSDVz4NUjL9VARH rlP3gB2tnT9AriDIt8BXpDOJscnsfxqsIq+vcE1f84NCI20uAE5EWi6DNZvp3Nh53r DeKx1JC6ueOU9JDs2BK3e39BiyTtuvVnJlG61jQFM3izsrFmLDB5Fj0i6b4FnivUM/ wtR3w+UU/4Ez5VZ5i8MBURBjmygEbTbm+v7ii0wZHGyActkREb3cpZezjW0is5VY9l k8ERLePaRYlQu7SunPoJvh42KADRFX8Ri08IA6WgVyj5KkaIgHn6+3pr+TKfvfNcX+ CaJ8HsC9jo6zQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C978B1B; Tue, 11 Feb 2025 19:52:33 +0100 (CET) Date: Tue, 11 Feb 2025 19:52:33 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Sami Imseih Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Kirill Reshke , Sergei Kornilov , yasuo.honda@gmail.com, tgl@sss.pgh.pa.us, smithpb2250@gmail.com, vignesh21@gmail.com, michael@paquier.xyz, nathandbossart@gmail.com, stark.cfm@gmail.com, geidav.pg@gmail.com, marcos@f10.com.br, robertmhaas@gmail.com, david@pgmasters.net, pgsql-hackers@postgresql.org, pavel.trukhanov@gmail.com, Sutou Kouhei Subject: Re: pg_stat_statements and "IN" conditions Message-ID: <202502111852.btskmr7nhien@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Feb-11, Sami Imseih wrote: > I have only looked at 0001, but I am wondering why > query_id_const_merge is a pg_stat_statements GUC > rather than a core GUC? I was wondering the same thing and found the explanation here: https://postgr.es/m/ZTmuCtymIS3n3fP_@paquier.xyz > Other extensions that consume queryIds may also want this > behavior without needing to enable pg_stat_statements. I agree. In fact, pg_stat_activity will behave differently (using merged query_ids) if this value is turned on, for which you need the contrib module. This makes no sense to me. Besides, the patch cheats in this regard: what Dmitry did was create a function SetQueryIdConstMerge() which the extension with the GUC can call to set the value of the variable. I really don't see that this is better. I think we should put the GUC back where it was in v15 of the patch. (I didn't check what other changes there were afterwards.) About the GUC name -- query_id_const_merge -- I think this is too much a hacker's name. How about query_id_merge_values query_id_merge_value_lists query_id_squash_constant_lists -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "No es bueno caminar con un hombre muerto"