Answer the question
In order to leave comments, you need to log in
How to monitor active connections to Postgres?
I'm connecting to postgers via the node-postgres library (creating a connection pool) and would like to see all active database connections for debugging purposes. What's the best way to ask them?
Answer the question
In order to leave comments, you need to log in
SELECT * FROM pg_stat_activity WHERE datname = 'dbname' and state = 'active';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question