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 1kShT7-000143-Cl for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 14:09:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kShT6-0001J9-5f for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 14:09:28 +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 1kShT5-0001Ix-Vs for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 14:09:27 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kShT3-0000BZ-A4 for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 14:09:27 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kShSt-0007bS-Ga; Wed, 14 Oct 2020 10:09:15 -0400 Date: Wed, 14 Oct 2020 10:09:15 -0400 From: Bruce Momjian To: Julien Rouhaud Cc: Tom Lane , Robert Haas , Michael Paquier , Alvaro Herrera , torikoshia , Atsushi Torikoshi , Tatsuro Yamada , Tomas Vondra , Evgeny Efimkin , PostgreSQL Hackers Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? Message-ID: <20201014140915.GJ24889@momjian.us> References: <20201007014249.GB2256@paquier.xyz> <20201007015346.GF12277@momjian.us> <20201012141445.GA24889@momjian.us> <3199563.1602527175@sss.pgh.pa.us> <20201012195443.GC24889@momjian.us> <3250173.1602533250@sss.pgh.pa.us> <20201012205340.GD24889@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Oct 14, 2020 at 05:43:33PM +0800, Julien Rouhaud wrote: > On Tue, Oct 13, 2020 at 4:53 AM Bruce Momjian wrote: > > > > On Mon, Oct 12, 2020 at 04:07:30PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > On Mon, Oct 12, 2020 at 02:26:15PM -0400, Tom Lane wrote: > > > >> Yeah, I agree --- a version number is the wrong way to think about this. > > > > > > > The version number was to invalidate _all_ query hashes if the > > > > algorithm is slightly modified, rather than invalidating just some of > > > > them, which could lead to confusion. > > > > > > Color me skeptical as to the use-case for that. From users' standpoints, > > > the hash is mainly going to change when we change the set of parse node > > > fields that get hashed. Which is going to happen at every major release > > > and no (or at least epsilon) minor releases. So I do not see a point in > > > tracking an algorithm version number as such. Seems like make-work. > > > > OK, I came up with the hash idea only to address one of your concerns > > about mismatched hashes for algorithm improvements/changes. Seems we > > might as well just document that cross-version hashes are different. > > Ok, so I tried to implement what seems to be the consensus. First > attached patch moves the current pgss queryid computation in core, > with a new compute_queryid GUC (on/off). One thing I don't really Why would someone turn compute_queryid off? Overhead? -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee