Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level
Date
Msg-id 20121218192433.14710@gmx.com
Whole thread Raw
List pgsql-admin
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


pgsql-admin by date:

Previous
From: Brett Gaston
Date:
Subject: pgstatspack pg_stat_statements error
Next
From: Baptiste LHOSTE
Date:
Subject: Re: [Autovacuum] Issue to understand some logs