Skip site navigation (1) Skip section navigation (2)

Re:

From: Alex Kloss <alexkloss(at)att(dot)net>
To: "Sherrylyn(Work)" <shines(at)datasof(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re:
Date: 2007-10-18 22:22:48
Message-ID: 4717DCB8.6010202@att.net (view raw or flat)
Thread:
Lists: pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sherrylyn(Work) wrote:
> Hi ,
>     Does any one know how I would get a list of users currently
connected to a
> postgres database? In Oracle, I could select from the vg$sessions table. Is
> there a corollary table in Postgres?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>        message can get through to the mailing list cleanly
>
SELECT usename FROM pg_stat_activity WHERE datname='databasename'

There's many other connection statistics in pg_stat_activity as well,
such as IP address, current query...

Alex Rowe


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHF9y3LGN3BhEHOicRAmOpAJ9ia+gYRRRJORBCXEvnwur3tIScEgCdHugX
E4fzATbhmA0SxYtIQ986xyQ=
=deCX
-----END PGP SIGNATURE-----


In response to

  • at 2007-10-18 17:42:06 from Sherrylyn(Work)

pgsql-admin by date

Next:From: Alex KlossDate: 2007-10-18 23:20:39
Subject: Re: Drop Not Null
Previous:From: Sarah MaaroufDate: 2007-10-18 20:51:41
Subject: unable to install postgresql-8.1.3-1.zip for winxp

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group