List all querys from a open transaction

From: Sebastian SWC <sebastianswc(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: List all querys from a open transaction
Date: 2011-07-05 23:28:25
Message-ID: CAPVjVduf=TGySHRM8hC2EqvpeZHFCUfTgKyx9vDDjFdt+txhfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hey all,

anyone know how can I show all querys from a open transaction?

pg_stat_activity only show "<IDLE> in transaction", any ideas?

Sample:

### conection 1
root(at)server:~# psql -U postgres
psql (8.4.4)

postgres=# begin;
BEGIN
postgres=# select now();
now
-------------------------------
2011-07-05 20:25:39.535244-03
(1 row)

### connection 2
root(at)server:~# psql -U postgres
psql (8.4.4)

postgres=# select current_query from pg_stat_activity where
current_query <> '<IDLE>' and current_query not like
'%pg_stat_activty%';
current_query
-----------------------
<IDLE> in transaction
(1 row)

--
Atenciosamente,
Sebastian Selau Webber Colombo

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Sabino Mullane 2011-07-06 01:32:41 Re: List all querys from a open transaction
Previous Message Ken Caruso 2011-07-05 21:53:04 pg_lesslog w/Postgres 9.0.X