Find the number of connections to your database select datname, procpid, usename, client_addr, client_port from pg_catalog.pg_stat_activity;