Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
1165df87
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1165df87
编写于
12月 27, 2017
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/devel' into devel
上级
55012bc4
9b22d6ff
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
2 deletion
+31
-2
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/lock/PostgreLockManager.java
...dbeaver/ext/postgresql/model/lock/PostgreLockManager.java
+31
-2
未找到文件。
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/lock/PostgreLockManager.java
浏览文件 @
1165df87
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2017 Andrew Khitrin (ahitrin@gmail.com)
* Copyright (C) 2017 Andrew Khitrin (ahitrin@gmail.com)
* 2017 Dmitriy.Gurov (dvgurov@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -61,6 +62,7 @@ public class PostgreLockManager extends LockGraphManager<PostgreLock,Integer> im
"('AccessExclusiveLock','AccessShareLock',1), ('AccessExclusiveLock','RowShareLock',2), ('AccessExclusiveLock','RowExclusiveLock',3), ('AccessExclusiveLock','ShareUpdateExclusiveLock',4), ('AccessExclusiveLock','ShareLock',5), ('AccessExclusiveLock','ShareRowExclusiveLock',6), ('AccessExclusiveLock','ExclusiveLock',7), ('AccessExclusiveLock','AccessExclusiveLock',8) "
+
") as t (mode1,mode2,prt) "
+
") "
+
",real_locks as ("
+
"select "
+
"la.pid as blocked_pid, "
+
"blocked_activity.usename AS blocked_user, "
+
...
...
@@ -86,7 +88,34 @@ public class PostgreLockManager extends LockGraphManager<PostgreLock,Integer> im
") la "
+
"join pg_catalog.pg_stat_activity blocked_activity ON blocked_activity.pid = la.pid "
+
"join pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid = la.blocked "
+
"where la.rid = 1"
;
"where la.rid = 1) "
+
", root_quest as ( "
+
" select blocking_pid as blocking_pid from real_locks "
+
" except "
+
" select blocked_pid from real_locks ) "
+
" select blocked_pid, "
+
" blocked_user, "
+
" blocking_pid, "
+
" blocking_user, "
+
" blocked_statement, "
+
" statement_in "
+
" from"
+
" real_locks"
+
" union"
+
" select"
+
" real_locks.blocking_pid, "
+
" real_locks.blocking_user, "
+
" null::integer, "
+
" null::text, "
+
" real_locks.statement_in, "
+
" null::text "
+
" from"
+
" real_locks, "
+
" root_quest "
+
" where"
+
" real_locks.blocking_pid = root_quest.blocking_pid "
;
public
static
final
String
LOCK_ITEM_QUERY
=
"select "
+
" coalesce(db.datname,'') as datname, "
+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录