Re: [survey] New "Stable" QueryId based on normalized query text - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: [survey] New "Stable" QueryId based on normalized query text
Date
Msg-id CAOBaU_ZgCPB-N261Gh2+35vakyKHFHcEbCFrCrwST_UEyUjr4w@mail.gmail.com
Whole thread Raw
In response to Re: [survey] New "Stable" QueryId based on normalized query text  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [survey] New "Stable" QueryId based on normalized query text
List pgsql-hackers
On Tue, Apr 9, 2019 at 11:26 PM Bruce Momjian <bruce@momjian.us> wrote:
>
> On Wed, Mar 20, 2019 at 03:19:58PM -0700, legrand legrand wrote:
> > > The rest of thread raise quite a lot of concerns about the semantics,
> > > the cost and the correctness of this patch.  After 5 minutes checking,
> > > it wouldn't suits your need if you use custom functions, custom types,
> > > custom operators (say using intarray extension) or if your tables
> > > don't have columns in the same order in every environment.  And there
> > > are probably other caveats that I didn't see;
> >
> > Yes I know,
> > It would have to be extended at less at functions, types, operators ...
> > names
> > and a guc pg_stat_statements.queryid_based= 'names' (default being 'oids')
> >
> > and with a second guc ('fullyqualifed' ?)
> > sould include tables, functions, types, operators ... namespaces
> >
> > let "users" specify their needs, we will see ;o)
>
> Why can't we just explose the hash computation as an SQL function and
> let people call it with pg_stat_activity.query or wherever they want the
> value?  We can install multiple functions if needed.

It'd be very nice to exposing the queryid computation at SQL level.
However it would allow to compute only the top-level queryid from
pg_stat_activity.  For monitoring and performance purpose, people
would probably want to see the queryid of the underlying query
actually running I think.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: hyrax vs. RelationBuildPartitionDesc
Next
From: Heikki Linnakangas
Date:
Subject: Re: Zedstore - compressed in-core columnar storage