PostgreSQL - How to show current active connection information?
You can get the active server process and its related activities using pg_stat_activity
:
SELECT
*
FROM
pg_stat_activity;
If you want to list all users, use pg_user
:
SELECT
*
FROM
pg_user;
Need a good GUI Tool for PostgreSQL? TablePlus is a modern, native tool with an elegant UI that allows you to simultaneously manage multiple databases such as MySQL, PostgreSQL, SQLite, Microsoft SQL Server and more.