How to view connection and SQL execution information in postgresql? SQL scripts to query connection and SQL execution information in postgresql?
Ezana Answered question 17/04/2023
To query the connected users and their clients:
SELECT datname,usename,client_addr,client_port FROM pg_stat_activity
And to Query the SQL execution information:
SELECT datname,usename,query FROM pg_stat_activity ;
Ezana Answered question 17/04/2023