The information in pg_stat_activity
is sort of scarce, and does not give progress information for long queries.
This information is sort of available in v$session_longops
in Oracle, which gives which object is being processed (target
), the number of items it needs to go through (totalwork
), and the number of item done so far (sofar
). One can then use that to infer what part of the execution plan the engine is in. This information is available in Spark and Flink as well.
I was wondering if there was a way to have access to that in Postgres, either in system tables, or by observing the processes, or where one might look in the internals if he wants to implement a patch.
Cheers!