> Okay, that's what I precisely wanted to understand: queryId doesn't have > semantics to show the job that consumes resources right now—it is mostly > about convenience to know that the backend processes nothing except > (probably) this query.
It may be a good idea to expose in pg_stat_activity or a supplemental activity view information about the current state of the query processing. i.e. Is it parsing, planning or executing a query or is it processing a nested query. I can see this being useful and perhaps could be taken up in a separate thread. Regards, Sami