Re: Long running transaction in pg_activity_log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: Long running transaction in pg_activity_log

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.


Regards,

Farhan




----- Original Message ----
From: Sachchida Ojha <sojha@xxxxxxxxxxxxxxxxxxx>
To: pgsql-performance@xxxxxxxxxxxxxx
Sent: Thursday, 23 August, 2007 1:40:09 AM
Subject: 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




Yahoo! Answers - Get better answers from someone who knows. Try it now.

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux