Query showing which queries are processing with info about it in PostgreSQL

Posted on

Question :

I’m pretty sure there is a query that shows which queries / processes are running in realtime. It shows which machine or user are running it, when they started and when they finish, and info like that about the query/process.

Anyone knows what query or queries can help me to see this info?

Answer :

I think you may find what you need querying the view pg_stat_activity. There is more information available regarding that view here

https://www.postgresql.org/docs/current/monitoring-stats.html

Leave a Reply

Your email address will not be published. Required fields are marked *