Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Hannu Krosing <hannuk@google.com>
From: Hannu Krosing <hannuk@google.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>,
Michael Paquier <michael@paquier.xyz>, torikoshia <torikoshia@oss.nttdata.com>,
Atsushi Torikoshi <atorik@gmail.com>, Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>, Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Evgeny Efimkin <efimkin@yandex-team.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-20T00:03:16Z
Lists: pgsql-hackers
It would be really convenient if user-visible serialisations of the query id had something that identifies the computation method. maybe prefix 'N' for internal, 'S' for pg_stat_statements etc. This would immediately show in logs at what point the id calculator was changed On Fri, Mar 19, 2021 at 5:54 PM Bruce Momjian <bruce@momjian.us> wrote: > On Fri, Mar 19, 2021 at 10:27:51PM +0800, Julien Rouhaud wrote: > > On Fri, Mar 19, 2021 at 09:29:06AM -0400, Bruce Momjian wrote: > > > OK, that makes perfect sense. I think the best solution is to document > > > that compute_query_id just controls the built-in computation of the > > > query id, and that extensions can also compute it if this is off, and > > > pg_stat_activity and log_line_prefix will display built-in or extension > > > computed query ids. > > > > So the last version of the patch should implement that behavior right? > It's > > just missing some explicit guidance that third-party extensions should > only > > calculate a queryid if compute_query_id is off > > Yes, I think we are now down to just how the extensions should be told > to behave, and how we document this --- see the email I just sent. > > -- > Bruce Momjian <bruce@momjian.us> https://momjian.us > EDB https://enterprisedb.com > > If only the physical world exists, free will is an illusion. > > > >
Commits
-
Clarify description of pg_stat_statements columns
- b4deefc39b93 15.0 landed
- 3b57d5af7435 14.0 landed
-
Fix wording in description of pg_stat_statements.toplevel
- f9e6d00df029 14.0 landed
-
Mention that toplevel is part of pg_stat_statements key.
- 7531fcb1fcf5 14.0 landed
-
adjust query id feature to use pg_stat_activity.query_id
- 9660834dd8bf 14.0 landed
-
Update copyright for 2021
- ca3b37487be3 14.0 cited
-
Take the statistics collector out of the loop for monitoring backends'
- b13c9686d084 8.2.0 cited