List of currently connected users

Started by juleniover 23 years ago3 messagesgeneral
Jump to latest
#1juleni
juleni@seznam.cz

Hello,
Is it possible to show a list of all currently connected users into the
specific postgres database (what's the command)?

Thanks,
Julian

mailto:juleni@seznam.cz

#2Medi Montaseri
medi.montaseri@intransa.com
In reply to: juleni (#1)
Re: List of currently connected users

ps -ef | grep post

postgres 4571 27462 0 12:02 ? 00:00:00 postgres: medi Test1
[local] idl

says, some guy name 'medi' is connected to database 'Test1' via process
ID 4571.

or

psql -c "select * from pg_stat_activitity"

datid | datname | procpid | usesysid | usename | current_query
-------+---------+---------+----------+---------+---------------
16556 | Test1 | 4571 | 100 | medi |
(1 row)

Which says some guy named 'medi' is connecting to database 'Test1' via
process ID 4571.

Isn't PG cool....

juleni wrote:

Show quoted text

Hello,
Is it possible to show a list of all currently connected users into the
specific postgres database (what's the command)?

Thanks,
Julian

mailto:juleni@seznam.cz

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#3Chris Boget
chris@wild.net
In reply to: juleni (#1)
Re: List of currently connected users

Isn't PG cool....

It's getting that way.
I currently use mySQL at my work and I'm thinking about using PG for
a personal project so I've been lurking on the list. I must say, I've been
seeing a few things that have been pretty cool. Lots I've been aching to
ask about but haven't yet because I haven't fully delved into the docs.
But I must say, I like what I've been seeing so far. :p

Chris