Databases · Senior · Question 50 of 75

What does pg_stat_activity help you diagnose during an incident?

Explanation

Combine it with pg_locks to find the blocking session. pg_cancel_backend cancels a query; pg_terminate_backend ends the session.

Further reading

Problem with a question

Databases · Senior · question 50

Test yourself

Take the Databases · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz