Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhGMq-0000jG-LE for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 18:47:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhGMp-0003C7-Az for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 18:47:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhGMp-0003Bz-2t for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 18:47:27 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhGMm-0007Z8-Mu for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 18:47:26 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 51E1C5F799; Thu, 13 May 2021 14:47:23 -0400 (EDT) Date: Thu, 13 May 2021 14:47:23 -0400 From: Stephen Frost To: Tom Lane Cc: Bruce Momjian , Christoph Berg , Julien Rouhaud , Pavel Stehule , Kyotaro Horiguchi , Magnus Hagander , Fujii Masao , Michael Paquier , Andres Freund , Alvaro Herrera , Peter Eisentraut , PostgreSQL Hackers Subject: Re: compute_query_id and pg_stat_statements Message-ID: <20210513184723.GH20766@tamriel.snowman.net> References: <20210513015700.fp33q5rfvwl2ahfx@nol> <20210513030652.GB11075@momjian.us> <20210513031613.j47baglf6xl3mgbs@nol> <20210513033332.GF11075@momjian.us> <20210513040342.fouh7ryglrfgxglu@nol> <20210513144143.GG11075@momjian.us> <20210513175947.GP11075@momjian.us> <20210513180706.GG20766@tamriel.snowman.net> <1579535.1620930549@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QhLX2zEga9rAwAWX" Content-Disposition: inline In-Reply-To: <1579535.1620930549@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --QhLX2zEga9rAwAWX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > There's a ridiculously simple option here which is: drop the idea that > > we support an extension redefining the query id and then just make it > > on/off with the default to be 'on'. >=20 > I do not think that defaulting it to 'on' is acceptable unless you can > show that the added overhead is negligible. IIUC the measurements that > have been done show the opposite. Ah, right, it had only been done before when pg_stat_statements was loaded.. In which case, it seems like we should: a) go back to that b) if someone wants an alternative query ID, tell them to add it to pg_stat_statements and make it configurable *there* c) Have pg_stat_statements provide another function/view/etc that folks can use to get a queryid for an ongoing query ..? d) Maybe come up with a way for extensions, generically, to make a value available to log_line_prefix? That could be pretty interesting. Or just accept that this is a bit hokey with the 'auto' approach. I get Bruce has concerns about it but I'm not convinced that it's actually all that bad to go with that. Thanks, Stephen --QhLX2zEga9rAwAWX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJgnXQ6AAoJEO1sijiDR2RVfFgP/1jxQmUkGDfRCE+WZbi3nbk1 izJYILMhw4dlVMBc9tapVlLjH22j8Gum2DZ1R6tVBvfKNEs1D+fLdwdaiRu/Mbau UMS3q9SUz7TqVP2U7kxQUU4qG2kQXqR0HE9tgF3HKZkraf7NTj3tkTcKeJxyMv2y kROq/ybdl6HouvGCalTz02AXPhe5mR+jeroVdS+Mk6Y+DXOXPcx2zCBcNAx9FbJw AiuXniCOLkuSGS25plWFnGRcLBppoRcrODB/J8fXLV8kOUnu8m1MXwp3Ub2IF8v6 Mo4U350g8Yqgz0d7VbO5hXtiqgkNQFybJxyNWdE4kYMBNOPxxFBTe99cF12HqS11 4hPD9sBKR2nRGe/4Ys5Yop98NHGNLk9XuEIlGYHZBfmy2dyd48wlly8l2VS8OY9T wWtmAUNKIUgh7v+AduU8IC1BCftDngoRsoyuIuos5AZGLeUn2CJQTnLZTaOlTi8X cVnwOyaxVvCWC/Q3U4S7WdtQmKF6tUkxofitSq3HMspThmLpEm5mpMUy354r2/9j Tn6/o+2WTIAMsh0WwCUWNT65X4K76YHHTEBgMjVl/vuMWSiApBzF/hzrpjASij6M L69t77uprpB/QT5H1NBvpeWbeTwXIg9KD05gAWqiD8m5vX+SeN/w45KS/pLaFTYO 1r7I1aOH/cO8bk19VngX =z4jK -----END PGP SIGNATURE----- --QhLX2zEga9rAwAWX--