查看会话持锁情况
最近更新时间: 2024-10-17 17:10:00
- 排它锁阻塞。
postgres=# select pid,pg_blocking_pids(pid),EXTRACT(EPOCH FROM(now()-query_start)),wait_event_type,query from pg_stat_activity where wait_event_type = 'Lock' and pid!=pg_backend_pid();
- 同步阻塞。
postgres=# select query,wait_event_type,wait_event from pg_stat_activity where wait_event='SyncRep';