Skip site navigation (1) Skip section navigation (2)

Re: Long running transaction in pg_activity_log

From: Farhan Mughal <farhanhafeezmughal(at)yahoo(dot)co(dot)uk>
To: Sachchida Ojha <sojha(at)secure-elements(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Long running transaction in pg_activity_log
Date: 2007-08-22 21:58:40
Message-ID: (view raw or whole thread)
Lists: pgsql-performance
If I am not wrong, you must be asking about this:

select * from pg_stat_activity;

If you see <command string 
  not enabled> in the query column. 

Turn on the stats_command_string option in postgresql.conf.




----- Original Message ----
From: Sachchida Ojha <sojha(at)secure-elements(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Sent: Thursday, 23 August, 2007 1:40:09 AM
Subject: [PERFORM] Long running transaction in pg_activity_log

Long running transaction in pg_activity_log


I see some long running transaction in my pg_activity_log table. My app becomes almost unusable. My question is 

How can I query the database to see what sql these transactions are running. 

16385;"em_db";20893;16386;"em_user";"<IDLE> in transaction";f;"2007-08-22 20:38:06.527792+00";"2007-08-22 20:37:33.937193+00";"";52466

16385;"em_db";15110;16386;"em_user";"<IDLE> in transaction";f;"2007-08-22 20:05:08.580643+00";"2007-08-22 19:39:11.670572+00";"";50961

16385;"em_db";15113;16386;"em_user";"<IDLE> in transaction";f;"2007-08-22 20:06:01.53394+00";"2007-08-22 19:39:11.704564+00";"";50964




Want ideas for reducing your carbon footprint? Visit Yahoo! For Good

pgsql-performance by date

Next:From: Stephen DaviesDate: 2007-08-22 23:30:13
Subject: Re: Optimising "in" queries
Previous:From: Carlo StonebanksDate: 2007-08-22 21:09:52
Subject: Re: Fast tsearch2, trigram matching on short phrases

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group