Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cb94db91
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,发现更多精彩内容 >>
提交
cb94db91
编写于
6月 16, 2011
作者:
H
Heikki Linnakangas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pgindent run of recent SSI changes. Also, remove an unnecessary #include.
Kevin Grittner
上级
758bd2a4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
17 deletion
+15
-17
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtree.c
+0
-1
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsearch.c
+2
-2
src/backend/access/transam/twophase_rmgr.c
src/backend/access/transam/twophase_rmgr.c
+2
-2
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/predicate.c
+5
-6
src/include/storage/predicate.h
src/include/storage/predicate.h
+1
-1
src/include/storage/predicate_internals.h
src/include/storage/predicate_internals.h
+5
-5
未找到文件。
src/backend/access/nbtree/nbtree.c
浏览文件 @
cb94db91
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "storage/indexfsm.h"
#include "storage/indexfsm.h"
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "storage/lmgr.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "storage/smgr.h"
#include "storage/smgr.h"
#include "tcop/tcopprot.h"
#include "tcop/tcopprot.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
...
...
src/backend/access/nbtree/nbtsearch.c
浏览文件 @
cb94db91
...
@@ -849,8 +849,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -849,8 +849,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
if
(
!
BufferIsValid
(
buf
))
if
(
!
BufferIsValid
(
buf
))
{
{
/*
/*
* We only get here if the index is completely empty.
* We only get here if the index is completely empty.
Lock relation
*
Lock relation
because nothing finer to lock exists.
* because nothing finer to lock exists.
*/
*/
PredicateLockRelation
(
rel
,
scan
->
xs_snapshot
);
PredicateLockRelation
(
rel
,
scan
->
xs_snapshot
);
return
false
;
return
false
;
...
...
src/backend/access/transam/twophase_rmgr.c
浏览文件 @
cb94db91
...
@@ -26,7 +26,7 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
...
@@ -26,7 +26,7 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
NULL
,
/* END ID */
NULL
,
/* END ID */
lock_twophase_recover
,
/* Lock */
lock_twophase_recover
,
/* Lock */
NULL
,
/* pgstat */
NULL
,
/* pgstat */
multixact_twophase_recover
,
/* MultiXact */
multixact_twophase_recover
,
/* MultiXact */
predicatelock_twophase_recover
/* PredicateLock */
predicatelock_twophase_recover
/* PredicateLock */
};
};
...
@@ -44,7 +44,7 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
...
@@ -44,7 +44,7 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
NULL
,
/* END ID */
NULL
,
/* END ID */
lock_twophase_postabort
,
/* Lock */
lock_twophase_postabort
,
/* Lock */
pgstat_twophase_postabort
,
/* pgstat */
pgstat_twophase_postabort
,
/* pgstat */
multixact_twophase_postabort
,
/* MultiXact */
multixact_twophase_postabort
,
/* MultiXact */
NULL
/* PredicateLock */
NULL
/* PredicateLock */
};
};
...
...
src/backend/storage/lmgr/predicate.c
浏览文件 @
cb94db91
...
@@ -483,10 +483,9 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
...
@@ -483,10 +483,9 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
* MySerializableXact, so that subsequent calls to this function can exit
* MySerializableXact, so that subsequent calls to this function can exit
* quickly.
* quickly.
*
*
* A transaction is flagged as RO_SAFE if all concurrent R/W
* A transaction is flagged as RO_SAFE if all concurrent R/W transactions
* transactions commit without having conflicts out to an earlier
* commit without having conflicts out to an earlier snapshot, thus
* snapshot, thus ensuring that no conflicts are possible for this
* ensuring that no conflicts are possible for this transaction.
* transaction.
*/
*/
if
(
SxactIsROSafe
(
MySerializableXact
))
if
(
SxactIsROSafe
(
MySerializableXact
))
{
{
...
@@ -498,7 +497,7 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
...
@@ -498,7 +497,7 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
if
(
!
PredicateLockingNeededForRelation
(
relation
))
if
(
!
PredicateLockingNeededForRelation
(
relation
))
return
false
;
return
false
;
return
true
;
/* no excuse to skip predicate locking */
return
true
;
/* no excuse to skip predicate locking */
}
}
/*
/*
...
@@ -516,7 +515,7 @@ SerializationNeededForWrite(Relation relation)
...
@@ -516,7 +515,7 @@ SerializationNeededForWrite(Relation relation)
if
(
!
PredicateLockingNeededForRelation
(
relation
))
if
(
!
PredicateLockingNeededForRelation
(
relation
))
return
false
;
return
false
;
return
true
;
/* no excuse to skip predicate locking */
return
true
;
/* no excuse to skip predicate locking */
}
}
...
...
src/include/storage/predicate.h
浏览文件 @
cb94db91
...
@@ -54,7 +54,7 @@ extern void ReleasePredicateLocks(const bool isCommit);
...
@@ -54,7 +54,7 @@ extern void ReleasePredicateLocks(const bool isCommit);
/* conflict detection (may also trigger rollback) */
/* conflict detection (may also trigger rollback) */
extern
void
CheckForSerializableConflictOut
(
const
bool
valid
,
const
Relation
relation
,
const
HeapTuple
tuple
,
extern
void
CheckForSerializableConflictOut
(
const
bool
valid
,
const
Relation
relation
,
const
HeapTuple
tuple
,
const
Buffer
buffer
,
const
Snapshot
snapshot
);
const
Buffer
buffer
,
const
Snapshot
snapshot
);
extern
void
CheckForSerializableConflictIn
(
const
Relation
relation
,
const
HeapTuple
tuple
,
const
Buffer
buffer
);
extern
void
CheckForSerializableConflictIn
(
const
Relation
relation
,
const
HeapTuple
tuple
,
const
Buffer
buffer
);
extern
void
CheckTableForSerializableConflictIn
(
const
Relation
relation
);
extern
void
CheckTableForSerializableConflictIn
(
const
Relation
relation
);
...
...
src/include/storage/predicate_internals.h
浏览文件 @
cb94db91
...
@@ -90,9 +90,9 @@ typedef struct SERIALIZABLEXACT
...
@@ -90,9 +90,9 @@ typedef struct SERIALIZABLEXACT
int
pid
;
/* pid of associated process */
int
pid
;
/* pid of associated process */
}
SERIALIZABLEXACT
;
}
SERIALIZABLEXACT
;
#define SXACT_FLAG_COMMITTED 0x00000001
/* already committed */
#define SXACT_FLAG_COMMITTED 0x00000001
/* already committed */
#define SXACT_FLAG_PREPARED 0x00000002
/* about to commit */
#define SXACT_FLAG_PREPARED 0x00000002
/* about to commit */
#define SXACT_FLAG_DOOMED 0x00000004
/* will roll back */
#define SXACT_FLAG_DOOMED 0x00000004
/* will roll back */
/*
/*
* The following flag actually means that the flagged transaction has a
* The following flag actually means that the flagged transaction has a
* conflict out *to a transaction which committed ahead of it*. It's hard
* conflict out *to a transaction which committed ahead of it*. It's hard
...
@@ -132,8 +132,8 @@ typedef struct PredXactListData
...
@@ -132,8 +132,8 @@ typedef struct PredXactListData
/*
/*
* These global variables are maintained when registering and cleaning up
* These global variables are maintained when registering and cleaning up
* serializable transactions. They must be global across all backends,
* serializable transactions. They must be global across all backends,
* but are not needed outside the predicate.c source file. Protected
* but are not needed outside the predicate.c source file. Protected
by
*
by
SerializableXactHashLock.
* SerializableXactHashLock.
*/
*/
TransactionId
SxactGlobalXmin
;
/* global xmin for active serializable
TransactionId
SxactGlobalXmin
;
/* global xmin for active serializable
* transactions */
* transactions */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录