Re: Long running transaction in pg_activity_log

From: "Sachchida Ojha" <sojha(at)secure-elements(dot)com>
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 20:54:29
Message-ID: E099DB9EF394534CBA0F62ED03CF3BBF0607775A@EXVS01.IceMAIL.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I can see SQL in the current SQL column of pg_activity_log when I run
sql from sql window or throgh odbc/jdbc connection but when sql is
embedded in java beaans i can see those sql. Is there any way to
extract those sql from the database.


16385;"em_db";20220;16388;"emsowner";"select * from
pg_stat_activity;";f;"2007-08-22 20:48:25.062663+00";"2007-08-22
20:30:58.600489+00";"10.0.200.165";4170

Regards
Sachchida

________________________________

From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Sachchida
Ojha
Sent: Wednesday, August 22, 2007 4:40 PM
To: pgsql-performance(at)postgresql(dot)org
Subject: [PERFORM] 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";"127.0.0.1";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";"127.0.0.1";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";"127.0.0.1";50964

Thanks
Regards
Sachi

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tobias Brox 2007-08-22 21:08:58 Re: Long running transaction in pg_activity_log
Previous Message Oleg Bartunov 2007-08-22 20:43:07 Re: Fast tsearch2, trigram matching on short phrases