From: Kevin Grittner <kgrittn@mail.com>
To: Shams Khan <shams.khan22@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level
Date: Tue, 18 Dec 2012 14:24:33 -0500
Message-ID: <20121218192433.14710@gmx.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: kgrittn@mail.com, shams.khan22@gmail.com
Subject: Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level
In-Reply-To: <20121218192433.14710@gmx.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox