How can you get the active users connected to a postgreSQL database via SQL? This could be the userid’s or number of users.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(question) Don’t you get that info in
or using the view pg_stat_activity:
Added:
the view says:
can’t you filter and get that information? that will be the current users on the Database, you can use began execution time to get all queries from last 5 minutes for example…
something like that.