Thread: Number of connection

Number of connection

From
"Nebojsa Pirocanac"
Date:
Hi all,
How can I get number of current connections to the database and is there any way to identify connection. For example in Oracle I can get these information from dynamic view V$SESSION.
 
Thanks,
Nebojsa.

Re: Number of connection

From
Tom Lane
Date:
"Nebojsa Pirocanac" <pirke@EUnet.yu> writes:
> How can I get number of current connections to the database and is there an=
> y way to identify connection. For example in Oracle I can get these informa=
> tion from dynamic view V$SESSION.

In 7.2, yes.  See
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/monitoring.html
and read about pg_stat_activity.

            regards, tom lane