Tuesday, May 20, 2008

pg_proctab Example

markwkm=# select procpid, datname, comm, current_query, starttime, rss from pg_stat_activity, pg_proctab() where procpid = pid;
procpid | datname | comm | current_query | starttime | rss
---------+---------+----------+-----------------------------------------------------------------------------------------------------------------------+-----------+------
18321 | markwkm | postgres | select procpid, datname, comm, current_query, starttime, rss from pg_stat_activity, pg_proctab() where procpid = pid; | 1170859 | 1175
(1 row)

Labels: ,