设为首页 加入收藏

TOP

pg_cancel_backend() 与pg_terminate_backend()(二)
2014-11-23 22:31:42 来源: 作者: 【 】 浏览:5
Tags:pg_cancel_backend pg_terminate_backend
lication_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | waiting | current_query -------+----------+---------+----------+----------+------------------+-------------+-----------------+-------------+-------------------------------+-------------------- -----------+-------------------------------+---------+--------------------------------- 12699 | postgres | 10918 | 10 | postgres | psql | | | -1 | 2013-12-03 15:25:12.613672+08 | 2013-12-03 15:30:29 .544088+08 | 2013-12-03 15:30:29.544088+08 | f | select * from pg_stat_activity;

通过以上实验理解起来应该 很简单了,procpid=10305在pg_cancel_backend()下,session还在,事物回退,在pg_terminate_backend()操作后,session消失,事物回退。如果在某些时候pg_terminate_backend()不能杀死session,那么可以在os层面,直接kill -9 pid
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇8天学通MongoDB――第二天 细说增.. 下一篇ocp 1Z0-051 1-22题解析

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: