Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a95ac415
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a95ac415
编写于
2月 22, 2001
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More comment cleanups.
上级
82fc51e0
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
15 addition
and
13 deletion
+15
-13
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+15
-13
未找到文件。
src/backend/storage/lmgr/lock.c
浏览文件 @
a95ac415
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.8
2 2001/02/22 23:02:33
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.8
3 2001/02/22 23:20:06
momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
...
...
@@ -45,7 +45,7 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
static
void
LockCountMyLocks
(
SHMEM_OFFSET
lockOffset
,
PROC
*
proc
,
int
*
myHolding
);
static
char
*
lock_
typ
es
[]
=
static
char
*
lock_
mode_nam
es
[]
=
{
"INVALID"
,
"AccessShareLock"
,
...
...
@@ -65,16 +65,18 @@ static char *DeadLockMessage = "Deadlock detected.\n\tSee the lock(l) manual pag
/*------
* The following configuration options are available for lock debugging:
*
*
trace_locks
-- give a bunch of output what's going on in this file
*
trace_userlocks
-- same but for user locks
*
trace_lock_oidmin
-- do not trace locks for tables below this oid
*
TRACE_LOCKS
-- give a bunch of output what's going on in this file
*
TRACE_USERLOCKS
-- same but for user locks
*
TRACE_LOCK_OIDMIN
-- do not trace locks for tables below this oid
* (use to avoid output on system tables)
* trace_lock_table -- trace locks on this table (oid) unconditionally
* debug_deadlocks -- currently dumps locks at untimely occasions ;)
* TRACE_LOCK_TABLE -- trace locks on this table (oid) unconditionally
* DEBUG_DEADLOCKS -- currently dumps locks at untimely occasions ;)
*
* Furthermore, but in storage/ipc/spin.c:
*
trace_spinlocks
-- trace spinlocks (pretty useless)
*
TRACE_SPINLOCKS
-- trace spinlocks (pretty useless)
*
* Define LOCK_DEBUG at compile time to get all this enabled.
* Define LOCK_DEBUG at compile time to get all these enabled.
* --------
*/
int
Trace_lock_oidmin
=
BootstrapObjectIdData
;
...
...
@@ -112,7 +114,7 @@ LOCK_PRINT(const char * where, const LOCK * lock, LOCKMODE type)
lock
->
granted
[
1
],
lock
->
granted
[
2
],
lock
->
granted
[
3
],
lock
->
granted
[
4
],
lock
->
granted
[
5
],
lock
->
granted
[
6
],
lock
->
granted
[
7
],
lock
->
nGranted
,
lock
->
waitProcs
.
size
,
lock_
typ
es
[
type
]);
lock
->
waitProcs
.
size
,
lock_
mode_nam
es
[
type
]);
}
...
...
@@ -494,7 +496,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
#ifdef LOCK_DEBUG
if
(
lockmethod
==
USER_LOCKMETHOD
&&
Trace_userlocks
)
elog
(
DEBUG
,
"LockAcquire: user lock [%u] %s"
,
locktag
->
objId
.
blkno
,
lock_
typ
es
[
lockmode
]);
locktag
->
objId
.
blkno
,
lock_
mode_nam
es
[
lockmode
]);
#endif
/* ???????? This must be changed when short term locks will be used */
...
...
@@ -615,7 +617,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
break
;
/* safe: we have a lock >= req level */
elog
(
DEBUG
,
"Deadlock risk: raising lock level"
" from %s to %s on object %u/%u/%u"
,
lock_
types
[
i
],
lock_typ
es
[
lockmode
],
lock_
mode_names
[
i
],
lock_mode_nam
es
[
lockmode
],
lock
->
tag
.
relId
,
lock
->
tag
.
dbId
,
lock
->
tag
.
objId
.
blkno
);
break
;
}
...
...
@@ -1123,7 +1125,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag,
Assert
(
holder
->
holding
[
lockmode
]
>=
0
);
SpinRelease
(
masterLock
);
elog
(
NOTICE
,
"LockRelease: you don't own a lock of type %s"
,
lock_
typ
es
[
lockmode
]);
lock_
mode_nam
es
[
lockmode
]);
return
FALSE
;
}
Assert
(
holder
->
nHolding
>
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录