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?
I think you may find what you need querying the view pg_stat_activity. There is more information available regarding that view here