From: Bruce Momjian <bruce@momjian.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: torikoshia <torikoshia@oss.nttdata.com>
Cc: Atsushi Torikoshi <atorik@gmail.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Evgeny Efimkin <efimkin@yandex-team.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: Tue, 6 Oct 2020 21:53:46 -0400
Message-ID: <20201007015346.GF12277@momjian.us> (raw)
In-Reply-To: <20201007014249.GB2256@paquier.xyz>
References: <1817289.1601934179@sss.pgh.pa.us>
<20201005225842.GA8918@alvherre.pgsql>
<20201006021819.GA10975@momjian.us>
<CAOBaU_axtsj8Ad07wPrr0Way---+v0pz3BnXa_m2xuCKE32Y0Q@mail.gmail.com>
<20201006032350.GA3686@momjian.us>
<20201006053458.GA429@paquier.xyz>
<20201006132229.GB3686@momjian.us>
<20201007014249.GB2256@paquier.xyz>
On Wed, Oct 7, 2020 at 10:42:49AM +0900, Michael Paquier wrote:
> On Tue, Oct 06, 2020 at 09:22:29AM -0400, Bruce Momjian wrote:
> > I propose moving the pg_stat_statements queryid hash code into the
> > server (with a version number), and also adding a postgresql.conf
> > variable that lets you control how detailed the queryid hash is
> > computed. This addresses the problem of people wanting different hash
> > methods.
>
> In terms of making this part expendable in the future, there could be
> a point in having an enum here, but are we sure that we will have a
> need for that in the future? What I get from this discussion is that
> we want a unique source of truth that users can consume, and that the
> only source of truth proposed is the PGSS hashing. We may change the
> way we compute the query ID in the future, for example if it gets
> expanded to some utility statements, etc. But that would be
> controlled by the version number in the hash, not the GUC itself.
Oh, if that is true, then I agree let's just go with the version number.
> > When computing a hash, the queryid detail level and version number will
> > be mixed into the hash, so only a hash that used a similar query and
> > identical queryid detail level would match.
>
> Yes, having a version number directly dependent on the hashing sounds
> like a good compromise to me.
Good, much simpler. I think there is enough demand for a queryid that I
would like to get this moving forward.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: bruce@momjian.us, michael@paquier.xyz, rjuju123@gmail.com, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, torikoshia@oss.nttdata.com, atorik@gmail.com, tatsuro.yamada.tf@nttcom.co.jp, robertmhaas@gmail.com, tomas.vondra@2ndquadrant.com, efimkin@yandex-team.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
In-Reply-To: <20201007015346.GF12277@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox