Re: empty,query_id, pg_stat_activity
От | Michael Paquier |
---|---|
Тема | Re: empty,query_id, pg_stat_activity |
Дата | |
Msg-id | aLjcXPixsn8XltZv@paquier.xyz обсуждение исходный текст |
Ответ на | Re: empty,query_id, pg_stat_activity (Greg Sabino Mullane <htamfids@gmail.com>) |
Ответы |
答复: empty,query_id, pg_stat_activity
|
Список | pgsql-bugs |
On Wed, Sep 03, 2025 at 04:54:27PM -0400, Greg Sabino Mullane wrote: > The session is active, but there is no I/O yet, as the query has arrived, > but has not been parsed yet. The queryid appears right before the query > actually executes, so a lack of queryid is a safe indicator that the query > is not actually doing any work yet- it's still spinning up. From a > performance monitoring standpoint, you should be safe to exclude rows with > no queryid. Yeah, and there's likely no point in feeding the data of pg_stat_activity to a CTAS, something that pg_stat_statements does for most people these days. FWIW, I use queries based on pg_stat_activity for monitoring purposes in benchmarks to get aggregated values about wait events, to be able to grab patterns, most of the time. Filtering out query IDs would lead to less information gathered. You did not mention why pg_stat_activity coupled with a query ID would be useful for you, especially since we have a bunch of pgstats views that are able to get aggregated data for the user, as well, to grab for bottlenecks, like pg_stat_io, etc. -- Michael
Вложения
В списке pgsql-bugs по дате отправления: