Обсуждение: List all querys from a open transaction
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
-----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-----