GreenPlum节点锁处理

select gp_execution_dbid() dbid,procpid,current_query
from gp_dist_random('pg_stat_activity')
where procpid in
(select pid from gp_dist_random('pg_locks') where and mode='ExclusiveLock')
and lower(current_query) like '%xxx%' ;

1.在navicat执行 查看dbid 3 的服务器及端口
select * from gp_segment_configuration where dbid = 3;
2.登录gp主节点
su - gpadmin
3.根据第一步获取的ip和端口修改命令
PGOPTIONS="-c gp_session_role=utility" psql -h xxxxxxxxx -p xxxx -d idap_zl
4.procpid修改为上午查询对应的procpid
select pg_terminate_backend('procpid');

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容