Re: any way to query for current connections to db? - Mailing list pgsql-general

From Scott Marlowe
Subject Re: any way to query for current connections to db?
Date
Msg-id dcc563d10711091458u24844acejf22bf728ed0be869@mail.gmail.com
Whole thread Raw
In response to any way to query for current connections to db?  ("Coarr, Matt" <mcoarr@mitre.org>)
List pgsql-general
On Nov 9, 2007 4:36 PM, Coarr, Matt <mcoarr@mitre.org> wrote:
>
> Is there any way to query the database to identify what the current
> connections are (connections, sessions, or whatever you want to call them)?
>
> This would be something similar to oracle's v$session view.

select * from pg_stat_activity where datname='mydbname'

should get you started.

You can see all the system tables with
\dS
in psql

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: any way to query for current connections to db?
Next
From: "Scott Marlowe"
Date:
Subject: Re: any way to query for current connections to db?