On 19t of January, Magnus Hagander committed patch: Separate state from query string in pg_stat_activity This separates the state (running/idle/idleintransaction etc) into it's own field ("state"), and leaves the query field containing just query text. The query text will now mean "current query" when a ...

unfrotunatelly i can't point you to message in archives, as there is some problem with them, and i dont see posts newer than "Fri Apr 04 12:00:08 2008". this patch was written by tomas doran, and commited by bruce momjian: