postgresql:terminate hung query
--Find the PID by running this sql:
SELECT pid , query, * from pg_stat_activity
WHERE state != 'idle' ORDER BY xact_start; --You'll find the pid in the first (left) column, and the first (top) row is likely to be the query you'd like to terminate.
--I'll assume the pid is 1234 below.
--You may cancel a query through SQL (i.e. without shell access) as long as it's yours or you have super user access:
select pg_cancel_backend(1960); --This is the "soft" way ... the query won't disappear immediately. If you're in a hurry, try this one instead:
select pg_terminate_backend(1960); --If you have shell access and root or postgres permissions you can also do it from the shell:
kill -INT 1234 --If that doesn't help, use:
kill 1234
postgresql:terminate hung query的更多相关文章
- 解决postgresql -- ERROR: 42601: query has no destination for result data
I am learning Npgsql and PostgreSQL. I am unable to define the output parameter correctly. What am I ...
- Understanding postgresql.conf : log*
After loooong pause, adding next (well, second) post to the “series“. This time, I'd like to describ ...
- Spark SQL访问PostgreSQL
随着Spark SQL的正式发布,以及它对DataFrame的支持,它可能会取代HIVE成为越来越重要的针对结构型数据进行分析的平台.在博客文章What’s new for Spark SQL in ...
- PostgreSQL数据库资料(转)
PostgreSQL数据库资料 转自:http://blog.csdn.net/postgrechina/article/details/49132791 推荐书籍: 概念书籍: <Postgr ...
- 打造基于 PostgreSQL/openGauss 的分布式数据库解决方案
在 MySQL ShardingSphere-Proxy 逐渐成熟并被广泛采用的同时,ShardingSphere 团队也在 PostgreSQL ShardingSphere-Proxy 上持续发力 ...
- Metasploit辅助模块
msf > show auxiliary Auxiliary ========= Name Di ...
- pg 资料大全1
https://github.com/ty4z2008/Qix/blob/master/pg.md?from=timeline&isappinstalled=0 PostgreSQL(数据库) ...
- 17--Box2D使用(三、触摸交互)
Box2D引擎与触摸的交互通过创建鼠标关节以及碰撞检测来得到触摸点下面的刚体,在根据触摸操作完成相应的功能.首先添加触摸响应函数声明 virtual void ccTouchesBegan(cocos ...
- cocos2d之Box2D详细说明 鼠标联合实现
cocos2d之Box2D具体解释 鼠标关节实现 DionysosLai2014-5-7 我们常常要移动物理世界中的某个物体,例如说石头.木块等.假设我们直接改变这些物体的位置,让这些物体尾随我们手指 ...
随机推荐
- 教你如何用笔记本设置超快WIFI
以win7为例 1.在主菜单运行框输入 cmd------->以管理员的身份运行 2.命令提示符中输入:netsh wlan set hostednetwork mode=allow ssid ...
- MySQL数据库报错pymysql.err.InterfaceError: (0, '')
今天入库的时候出现了报错pymysql.err.InterfaceError: (0, ''),经过排查,发现是由于把连接数据库的代码放到了插入函数的外部,导致多线程运行出错 def write_in ...
- linux中时间命令详解
DATE hling@hling:~$ date2018年 04月 11日 星期三 19:43:04 CSThling@hling:~$ date +%Y%M%d20184311hling@hling ...
- 【立体几何】分类讨论很细节 Gym - 101967I Путешествие по тору
http://codeforces.com/gym/101967/attachments 题意:定义了一个甜甜圈.(torus) 不是让你二重积分啦233 现在有一个星球是甜甜圈形状的,它有四条很关键 ...
- Redis安装[Windows]
一. redis下载地址: https://github.com/ServiceStack/redis-windows/tree/master/downloads 根据需要的下载对应版本*.zip ...
- Attention模型
李宏毅深度学习 https://www.bilibili.com/video/av9770302/?p=8 Generation 生成模型基本结构是这样的, 这个生成模型有个问题是我不能干预数据生成, ...
- SyntaxError:unexpected EOF while parsing(<string,line 0>)
在python+Django中出现报错:(上图) 经断点发现:python内置函数eval在处理空字符串时会返回EOF错误,判断后解决
- bounds的应用
frame是参考父view的坐标系来设置自己左上角的位置.设置bounds可以修改自己坐标系的原点位置,进而影响到其“子view”的显示位置. 向上滚动scrollview,我们就不断增加scro ...
- 【UML】NO.55.EBook.8.UML.3.001-【UML和模式应用 第3版】
1.0.0 Summary Tittle:[UML]NO.54.EBook.8.UML.3.001-[UML和模式应用 第3版] Style:DesignPattern Series:DesignPa ...
- 百度富文本Ueditor编辑器的使用
往在web开发的时候,尤其是在网站开发后台管理系统的时候经常会使用到富文本编辑器,这里我们来使用百度提供的富文本编辑器UEditor,以提高我们的开发效率 UEditor官网下载地址:https:// ...