Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yun Li <liyunjuanyong@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-03-16T01:50:08Z
Lists: pgsql-hackers
Yun Li <liyunjuanyong@gmail.com> writes: > Do you think if we can add queryId into the pg_stat_get_activity function > and ultimatly expose it in the view? It would be easier to track "similar" > query's performance over time easier. No, we're not likely to do that, because it would mean (1) baking one single definition of "query ID" into the core system and (2) paying the cost to calculate that ID all the time. pg_stat_statements has a notion of query ID, but that notion might be quite inappropriate for other usages, which is why it's an extension and not core. regards, tom lane
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