Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Yun Li <liyunjuanyong(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: 2019-03-18 18:24:19
Message-ID: CANNMO+J09i9HDikELGvU=gp1D5V5POaMZWLTSQ=Y4GMY0fYjwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

On Sat, Mar 16, 2019 at 7:32 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> Also, I think this is now the third independent request to expose
> query ID in pg_stat_statements. I think we should give the people
> what they want.
>

Count me as the 4th.

This would be a very important feature for automated query analysis.
pg_stat_statements lacks query examples, and the only way to get them is
from the logs.
Where we don't have queryid as well. So people end up either doing it
manually or writing
yet another set of nasty regular expressions.

Routing query analysis s a crucial for any large project. If there are
chances to implement
queryid for pg_stat_activity (or anything that will allow to automate query
analysis)
in Postgres 12 or later -- this would be a great news and huge support for
engineers.
Same level as recently implemented sampling for statement logging.

By the way, if queryid goes to the core someday, I'm sure it is worth to
consider using
it in logs as well.

Thanks,
Nik

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-03-18 18:33:42 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Previous Message Robert Haas 2019-03-18 18:05:01 Re: [HACKERS] Block level parallel vacuum