pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
List all querys from a open transaction
2+ messages / 2 participants
[nested] [flat]

* List all querys from a open transaction
@ 2011-07-05 23:28 Sebastian SWC <sebastianswc@gmail.com>
  2011-07-06 01:32 ` Re: List all querys from a open transaction Greg Sabino Mullane <greg@turnstep.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Sebastian SWC @ 2011-07-05 23:28 UTC (permalink / raw)
  To: 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@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@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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: List all querys from a open transaction
  2011-07-05 23:28 List all querys from a open transaction Sebastian SWC <sebastianswc@gmail.com>
@ 2011-07-06 01:32 ` Greg Sabino Mullane <greg@turnstep.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Greg Sabino Mullane @ 2011-07-06 01:32 UTC (permalink / raw)
  To: pgsql-admin


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> anyone know how can I show all querys from a open transaction?
>
> pg_stat_activity only show "<IDLE> in transaction", any ideas?

What would you have it show? The other session is between commands. 
Nothing is tracked at a historical level except in the database 
logs, so you would have to look there.


- -- 
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201107052131
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk4TuygACgkQvJuQZxSWSsi6FgCg8ybmvOriaopUsnW11sbXJdHm
HZIAoNfx/7QLm9xlk8H3EqhqZCX9okp3
=LAHI
-----END PGP SIGNATURE-----





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-07-06 01:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05 23:28 List all querys from a open transaction Sebastian SWC <sebastianswc@gmail.com>
2011-07-06 01:32 ` Greg Sabino Mullane <greg@turnstep.com>

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