Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "Shams Khan" <shams(dot)khan22(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level
Date: 2012-12-18 19:24:33
Message-ID: 20121218192433.14710@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2012-12-18 19:34:33 Re: [ADMIN] Problems with enums after pg_upgrade
Previous Message Andres Freund 2012-12-18 18:39:16 Re: [ADMIN] Problems with enums after pg_upgrade