Re: empty,query_id, pg_stat_activity - Mailing list pgsql-bugs

From Greg Sabino Mullane
Subject Re: empty,query_id, pg_stat_activity
Date
Msg-id CAKAnmmKn9Q0Kw6qiQu1dvW1hkq0twOCsX4AO9=Xbk56cOh1aJw@mail.gmail.com
Whole thread Raw
In response to empty,query_id, pg_stat_activity  ("zhouenbing" <zhouenbing@sunwoda-evb.com>)
Responses 答复: empty,query_id, pg_stat_activity
List pgsql-bugs
If the query_id* is null, it is not actually running yet. This is a good thing as far as your stated tracking requirements. You can do a WHERE query_id IS NOT NULL to exclude statements where the query has appeared, but has not been parsed and executed yet. I daresay you also want to be looking at wait_event and now()-state_change as well.

Cheers,
Greg


* Actually, query_id some places, queryid in others. So annoying.

--
Enterprise Postgres Software Products & Tech Support

pgsql-bugs by date:

Previous
From: Maxim Michkov
Date:
Subject: Re: BUG #18575: Sometimes pg_rewind mistakenly assumes that nothing needs to be done.
Next
From: Tom Lane
Date:
Subject: Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error