pg_wait_sampling
pg_wait_sampling copied to clipboard
No information about "no wait" state
The case of not waiting (wait_event_info == 0) is no less important than the case of waiting. Absence of "no wait" counts in profile make it impossible to compare waiting time to active time.
Looks like this requires another algorithm of iterating over backends, probably the same as in pg_stat_activity. Just commenting out if (proc->wait_event_info == 0) continue; in probe_waits() leaves a lot of empty rows in profile from some processes which are not listed in pg_stat_activity.