Databases · Senior · Question 50 of 75
What does pg_stat_activity help you diagnose during an incident?
- 1The list of all past queries
- ✓Correct answer: Which sessions are running what, for how long, and what they're waiting on (locks, I/O)
- 3Disk usage per table
Explanation
Combine it with pg_locks to find the blocking session. pg_cancel_backend cancels a query; pg_terminate_backend ends the session.