pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Maksim Milyutin <milyutinma@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Yun Li <liyunjuanyong@gmail.com>
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, 19 Mar 2019 16:45:17 +0300
Message-ID: <e26f1ee3-ff22-f871-2348-b04dbc98ec3e@gmail.com> (raw)
In-Reply-To: <CA+TgmobNUwzTnb6f5Kmw=qSXXs2sMexerd8uTyaHE2CG9=F=SQ@mail.gmail.com>
References: <CA+8PKvQnMfOE-c3YLRwxOsCYXQDyP8VXs6CDtMZp1V4=D4LuFA@mail.gmail.com>
	<21800.1552701008@sss.pgh.pa.us>
	<CA+TgmobNUwzTnb6f5Kmw=qSXXs2sMexerd8uTyaHE2CG9=F=SQ@mail.gmail.com>

On 3/16/19 5:32 PM, Robert Haas wrote:

> There's only one query ID field available, and
> you can't use two extensions that care about query ID unless they
> compute it the same way, and replicating all the code that computes
> the query ID into each new extension that wants one sucks.  I think we
> should actually bite the bullet and move all of that code into core,
> and then just let extensions say whether they care about it getting
> set.


+1.

But I think that enough to integrate into core the query normalization 
routine and store generalized query strings (from which the queryId is 
produced) in shared memory (for example, hashtable that maps queryId to 
the text representation of generalized query). And activate 
normalization routine and filling the table of generalized queries by 
specified GUC.

This allows to unbind extensions that require queryId from using 
pg_stat_statements and consider such computing of queryId as canonical.


-- 
Regards,
Maksim Milyutin





view thread (222+ messages)  latest in thread

Message-ID: <e26f1ee3-ff22-f871-2348-b04dbc98ec3e@gmail.com>
Permalink:  ../e26f1ee3-ff22-f871-2348-b04dbc98ec3e@gmail.com/
Also on:    postgresql.org/message-id/e26f1ee3-ff22-f871-2348-b04dbc98ec3e@gmail.com

 · 

reply

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: milyutinma@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, liyunjuanyong@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
  In-Reply-To: <e26f1ee3-ff22-f871-2348-b04dbc98ec3e@gmail.com>

* 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