GreenPlum锁表以及解除锁定

 

--GP查看锁
SELECT pid,rolname, rsqname, granted,
current_query, datname
FROM pg_roles, gp_toolkit.gp_resqueue_status, pg_locks, pg_stat_activity
WHERE pg_roles.rolresqueue=pg_locks.objid
AND pg_locks.objid=gp_toolkit.gp_resqueue_status.queueid
AND pg_stat_activity.procpid=pg_locks.pid;

--GP解除锁定
pg_cancel_backend(#pid)

你可能感兴趣的:(PostgreSQL)