Show Active Users connected to PostgreSQL

SELECT datname,usename,client_addr,client_port FROM pg_stat_activity ;
       datname       |           usename            | client_addr  | client_port
---------------------+------------------------------+--------------+-------------
 ci1                 | bob                          | 10.49.60.54  |       57234
 ci4                 | app_user1                    | 10.49.60.136 |       47162
 ci2                 | nobody123                    | 10.49.60.174 |       58108
 ci2                 | dont_ask_me                  | 10.49.60.174 |       58026

Do you have any question to us?

Contact us and we'll get back to you as soon as possible.