Re: Finding number of current connections - Mailing list pgsql-general

From Tom Lane
Subject Re: Finding number of current connections
Date
Msg-id 1113.996638593@sss.pgh.pa.us
Whole thread Raw
In response to Finding number of current connections  ("Tauren Mills" <tauren@servlets.net>)
Responses RE: Finding number of current connections  ("Tauren Mills" <tauren@servlets.net>)
Re: Finding number of current connections  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-general
"Tauren Mills" <tauren@servlets.net> writes:
> If there is not a tool to do this, how difficult would it be to build a tool
> to obtain this information?  Or is there simply no way to extract this
> information from pgsql?

Coming soon to a 7.2 near you:

regression=# select * from pg_stat_activity;
 datid  |  datname   | procpid | usesysid | usename  |          current_query
--------+------------+---------+----------+----------+---------------------------------
 400867 | regression |   29709 |      256 | postgres | select * from pg_stat_activity;
 400867 | regression |     452 |      256 | postgres |
(2 rows)

(the second backend doesn't have collect_querystring turned on, so it's
not reporting its current query...)

Hopefully, Jan will get around to writing some documentation about
this before release ;-)

            regards, tom lane

pgsql-general by date:

Previous
From: "Tauren Mills"
Date:
Subject: Finding number of current connections
Next
From: hubert depesz lubaczewski
Date:
Subject: indexing of INT8 ?