b0phfq
Last Updated: May 15, 2019
·
4.23K
· stevo

How to check who/what is connected to your PostgreSQL database?

How many times have we faced this kind of message...

DETAIL: There is 1 other session using the database.

... and had no idea what and who is connected to our db? To get this information, just open up your SQL console and type in

SELECT * FROM pg_stat_activity;

This should result in following listing being displayed

Picture