View monitoring_blocked_and_blocking_activity

Retuns the current status about blocked user and query information.

Columns

Column Name datatype Description
blocked_pid integer The connection identifier, that is blocked.
database_name oid The database name in which the query has been executed.
blocked_rolename name The role/user who is blocked.
blocking_pid integer The connection identifier, that is blocking.
blocking_rolename name The role/user who is blocking.
blocked_statement text This is the SQL source of the query that is blocked.
current_statement_in_blocking_procblocked_statementess text This is the SQL source of the query that is currently blocking.
blocked_query_age interval That is the duration, that the query is blocked.
blocking_query_age interval That is the duration, that the query is blocking.

Example

SELECT *
FROM monitoring_blocked_and_blocking_activity;