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
Dr. Ogg