Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Julien Rouhaud <julien.rouhaud@free.fr>
Cc: Bruce Momjian <bruce@momjian.us>, Evgeny Efimkin <efimkin@yandex-team.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-29T06:19:49Z
Lists: pgsql-hackers
On Wed, Nov 13, 2019 at 12:53:09PM +0100, Julien Rouhaud wrote: > I'd really like to have the queryid function available through SQL, > but I think that this specific case wouldn't work very well for > pg_stat_statements' approach as it's working with oid. The query > string in pg_stat_activity is the user provided one rather than a > fully-qualified version, so in order to get that query's queryid, you > need to know the exact search_path in use in that backend, and that's > not something available. Yeah.. So, we have a patch marked as ready for committer here, and it seems to me that we have a couple of issues to discuss more about first particularly this query ID of 0. Again, do others have more any input to offer? -- Michael
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