Last Updated: February 25, 2016
·
564
· plugin73

Viewing current PostgreSQL queries

psql=# SELECT datname, pid, query_start, query FROM pg_stat_activity;


datname | pid | query_start | query

tvgridstaging | 29744 | 2013-06-17 05:13:37.141552+00 | SELECT * FROM "jobattempts"

tv_staging | 16879 | 2013-06-17 05:11:21.847827+00 | SELECT count(*) FROM "subscribes"

</pre>