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 我们常常要移动物理世界中的某个物体,例如说石头.木块等.假设我们直接改变这些物体的位置,让这些物体尾随我们手指 ...
随机推荐
- java学习之路--面试之并发基础
1. 什么是原子操作?在Java Concurrency API中有哪些原子类(atomic classes)?原子操作是指一个不受其他操作影响的操作任务单元.原子操作是在多线程环境下避免数据不一致必 ...
- python API whoami
import getpass print getpass.getuser() See the documentation of the getpass module. getpass.getuser( ...
- Excel GET.DOCUMENT说明
GET.DOCUMENT(type_num, name_text) Type_num 指明信息类型的数.下表列出 type_num 的可能值与对应结果. Type_num 返回 1 ...
- HTML、CSS知识点,面试开发都会需要--No.4 内容布局
No.4 内容布局 1.列举场景 同一行布局三个元素.三个元素等比显示,并且其他元素不会围绕这三个元素.如下要让下面的三个column等比显示在一行: 2.通过Float属性实现 (1)float:l ...
- STM32手记
20k的ram,64k的Flash 2.3.7: 复位,内部8MHz工作. 外部时钟出错时,自动切换到内部RC时钟,可设置该中断,PLL同样能监测. 高速时钟最大72M,低速时钟,最大36M. 2.3 ...
- arcpy加载mxd文件时,无效的MXD路径,提示assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
无效的MXD路径,将路径前加‘u’,改为这种: mxdPath = u"C:\\1331\\DB\\Original Files\\dd.mxd" 参考: https://gis. ...
- Mac系统下 PHP7安装Swoole扩展 教程
转载自 https://www.fujieace.com/php/php-extensions/swoole.html 今天我用的PHP版本是:PHP7.1 环境依赖: php-5.3.10 或更高版 ...
- python中Hadamard product和matrix product的区分
先简单说一下Hadamard product: (参照维基百科:https://en.wikipedia.org/wiki/Hadamard_product_(matrices)) 而matrix ...
- Java命令行参数解析
参考 http://blog.csdn.net/mldxs/article/details/36204079 http://rensanning.iteye.com/blog/2161201 imp ...
- eclispe集成Scalas环境后,导入外部Spark包报错:object apache is not a member of package org
在Eclipse中集成scala环境后,发现导入的Spark包报错,提示是:object apache is not a member of package org,网上说了一大推,其实问题很简单: ...