Shams Khan wrote: > select now()-query_start as runtime,client_addr,pid,query from > pg_stat_activity where not query like '%IDLE%' order by 1; > When I check Idle session running question, shows the many queries running > but end of the query it shows Rollback and commit which take lot of time. No, you need to adjust that query. Add the state column and maybe the xact_start column to your output, and it should then be obvious how to modify your where clause. People felt it would be useful to see what the last statement was which had been run on a connection which was idle or (especially) idle in transaction. The query column no longer shows anything other than a query. -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin