SELECT
l.locktype,
l.mode,
l.granted,
l.pid,
a.query,
a.state,
a.query_start
FROM pg_locks l
JOIN pg_stat_activity a ON l.pid = a.pid
WHERE l.relation = 'your_table_name'::regclass;
SELECT pg_terminate_backend(4868);
* 4868 is PID (Process ID)
No comments:
Post a Comment