I'm using SELECT current_query FROM pg_stat_activity;
to see the currently executing queries, but I noticed that the query is truncated. Is there any workaround or any other way to see the currently executing queries?
views:
204answers:
3
+2
A:
I can't seem to find an easy solution to this but this post from 2002 suggests you need to adjust a setting and recompile: http://osdir.com/ml/db.postgresql.sql/2002-05/msg00088.html
Artem Russakovskii
2009-07-16 03:37:51
Heh, I found a similar one from 2004. Was hoping it changed over all these years though. :(
ionut bizau
2009-07-16 03:45:08
: (
Artem Russakovskii
2009-07-16 03:55:52
+1
A:
you can just enable statement logging in postgresql (log_statement), and check the logs.
depesz
2009-07-16 04:01:09
+1
A:
PostgreSQL 8.4 adds the parameter "track_activity_query_size
". The value will still be truncated, but you can control at what length.
Magnus Hagander
2009-07-19 20:52:37