Monitoring the progress of commands
Using the earlier recipes, identify the active processes that concern you:
SELECT pid, query FROM pg_stat_activity WHERE state = 'active';
query column indicates that they are one of the following actions, then we can look at detailed progress information for them:
- Maintenance commands:
- Index commands:
- Data load/unload:
At this time,
SELECT statements don't provide detailed progress information.
How to do it…
Each type of command has specific progress information, so you must look in the view that's appropriate to the type of command.
All commands show...