Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
d0273c07
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,发现更多精彩内容 >>
提交
d0273c07
编写于
7月 04, 2000
作者:
V
Vadim B. Mikheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
misc
上级
e1a118e5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
12 deletion
+28
-12
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+2
-2
src/include/access/htup.h
src/include/access/htup.h
+9
-1
src/include/access/rmgr.h
src/include/access/rmgr.h
+8
-7
src/include/access/xlog.h
src/include/access/xlog.h
+5
-1
src/include/storage/itemptr.h
src/include/storage/itemptr.h
+4
-1
未找到文件。
src/backend/access/transam/xlog.c
浏览文件 @
d0273c07
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.1
6 2000/06/02 15:57:16 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.1
7 2000/07/04 01:49:43 vadim
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1402,7 +1402,7 @@ StartupXLOG()
...
@@ -1402,7 +1402,7 @@ StartupXLOG()
record
=
ReadRecord
(
&
RecPtr
,
buffer
);
record
=
ReadRecord
(
&
RecPtr
,
buffer
);
if
(
TransactionIdIsValid
(
record
->
xl_xid
)
&&
if
(
TransactionIdIsValid
(
record
->
xl_xid
)
&&
!
TransactionIdDidCommit
(
record
->
xl_xid
))
!
TransactionIdDidCommit
(
record
->
xl_xid
))
RmgrTable
[
record
->
xl_rmid
].
rm_undo
(
record
);
RmgrTable
[
record
->
xl_rmid
].
rm_undo
(
EndRecPtr
,
record
);
RecPtr
=
record
->
xl_prev
;
RecPtr
=
record
->
xl_prev
;
}
while
(
XLByteLE
(
checkPoint
.
undo
,
RecPtr
));
}
while
(
XLByteLE
(
checkPoint
.
undo
,
RecPtr
));
elog
(
LOG
,
"Undo done at (%u, %u)"
,
elog
(
LOG
,
"Undo done at (%u, %u)"
,
...
...
src/include/access/htup.h
浏览文件 @
d0273c07
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: htup.h,v 1.3
2 2000/07/03 02:54:17
vadim Exp $
* $Id: htup.h,v 1.3
3 2000/07/04 01:49:43
vadim Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -87,6 +87,8 @@ typedef struct xl_heap_delete
...
@@ -87,6 +87,8 @@ typedef struct xl_heap_delete
xl_heaptid
dtid
;
/* deleted tuple id */
xl_heaptid
dtid
;
/* deleted tuple id */
}
xl_heap_delete
;
}
xl_heap_delete
;
#define SizeOfHeapDelete (offsetof(xl_heaptid, tid) + SizeOfIptrData))
/* This is what we need to know about insert - 26 + data */
/* This is what we need to know about insert - 26 + data */
typedef
struct
xl_heap_insert
typedef
struct
xl_heap_insert
{
{
...
@@ -99,6 +101,8 @@ typedef struct xl_heap_insert
...
@@ -99,6 +101,8 @@ typedef struct xl_heap_insert
/* TUPLE DATA FOLLOWS AT END OF STRUCT */
/* TUPLE DATA FOLLOWS AT END OF STRUCT */
}
xl_heap_insert
;
}
xl_heap_insert
;
#define SizeOfHeapInsert (offsetof(xl_heap_insert, mask) + sizeof(uint8))
/* This is what we need to know about update - 28 + data */
/* This is what we need to know about update - 28 + data */
typedef
struct
xl_heap_update
typedef
struct
xl_heap_update
{
{
...
@@ -111,6 +115,8 @@ typedef struct xl_heap_update
...
@@ -111,6 +115,8 @@ typedef struct xl_heap_update
/* NEW TUPLE DATA FOLLOWS AT END OF STRUCT */
/* NEW TUPLE DATA FOLLOWS AT END OF STRUCT */
}
xl_heap_update
;
}
xl_heap_update
;
#define SizeOfHeapUpdate (offsetof(xl_heap_update, mask) + sizeof(uint8))
/* This is what we need to know about tuple move - 24 bytes */
/* This is what we need to know about tuple move - 24 bytes */
typedef
struct
xl_heap_move
typedef
struct
xl_heap_move
{
{
...
@@ -118,6 +124,8 @@ typedef struct xl_heap_move
...
@@ -118,6 +124,8 @@ typedef struct xl_heap_move
ItemPointerData
ttid
;
/* moved to */
ItemPointerData
ttid
;
/* moved to */
}
xl_heap_move
;
}
xl_heap_move
;
#define SizeOfHeapMove (offsetof(xl_heap_move, ttid) + SizeOfIptrData))
/* end of XLOG stuff */
/* end of XLOG stuff */
#endif
/* XLOG */
#endif
/* XLOG */
...
...
src/include/access/rmgr.h
浏览文件 @
d0273c07
...
@@ -13,8 +13,8 @@ typedef uint8 RmgrId;
...
@@ -13,8 +13,8 @@ typedef uint8 RmgrId;
typedef
struct
RmgrData
typedef
struct
RmgrData
{
{
char
*
rm_name
;
char
*
rm_name
;
char
*
(
*
rm_redo
)
();
/* REDO(XLogRecPtr
rptr) */
void
(
*
rm_redo
)();
/* REDO(XLogRecPtr lsn, XLogRecord
rptr) */
char
*
(
*
rm_undo
)
();
/* UNDO(XLogRecPtr
rptr) */
void
(
*
rm_undo
)();
/* UNDO(XLogRecPtr lsn, XLogRecord
rptr) */
}
RmgrData
;
}
RmgrData
;
extern
RmgrData
*
RmgrTable
;
extern
RmgrData
*
RmgrTable
;
...
@@ -24,11 +24,12 @@ extern RmgrData *RmgrTable;
...
@@ -24,11 +24,12 @@ extern RmgrData *RmgrTable;
*/
*/
#define RM_XLOG_ID 0
#define RM_XLOG_ID 0
#define RM_XACT_ID 1
#define RM_XACT_ID 1
#define RM_HEAP_ID 2
#define RM_SMGR_ID 2
#define RM_BTREE_ID 3
#define RM_HEAP_ID 10
#define RM_HASH_ID 4
#define RM_BTREE_ID 11
#define RM_RTREE_ID 5
#define RM_HASH_ID 12
#define RM_GIST_ID 6
#define RM_RTREE_ID 13
#define RM_GIST_ID 14
#define RM_MAX_ID RM_GIST_ID
#define RM_MAX_ID RM_GIST_ID
#endif
/* RMGR_H */
#endif
/* RMGR_H */
src/include/access/xlog.h
浏览文件 @
d0273c07
...
@@ -22,7 +22,7 @@ typedef struct XLogRecord
...
@@ -22,7 +22,7 @@ typedef struct XLogRecord
XLogRecPtr
xl_prev
;
/* ptr to previous record in log */
XLogRecPtr
xl_prev
;
/* ptr to previous record in log */
XLogRecPtr
xl_xact_prev
;
/* ptr to previous record of this xact */
XLogRecPtr
xl_xact_prev
;
/* ptr to previous record of this xact */
TransactionId
xl_xid
;
/* xact id */
TransactionId
xl_xid
;
/* xact id */
uint16
xl_len
;
/* len of record on this page */
uint16
xl_len
;
/* len of record
*data*
on this page */
uint8
xl_info
;
uint8
xl_info
;
RmgrId
xl_rmid
;
/* resource manager inserted this record */
RmgrId
xl_rmid
;
/* resource manager inserted this record */
...
@@ -32,6 +32,10 @@ typedef struct XLogRecord
...
@@ -32,6 +32,10 @@ typedef struct XLogRecord
#define SizeOfXLogRecord DOUBLEALIGN(sizeof(XLogRecord))
#define SizeOfXLogRecord DOUBLEALIGN(sizeof(XLogRecord))
#define MAXLOGRECSZ (2 * BLCKSZ)
#define MAXLOGRECSZ (2 * BLCKSZ)
#define XLogRecGetData(record) \
((char*)record + SizeOfXLogRecord)
/*
/*
* When there is no space on current page we continue on the next
* When there is no space on current page we continue on the next
* page with subrecord.
* page with subrecord.
...
...
src/include/storage/itemptr.h
浏览文件 @
d0273c07
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: itemptr.h,v 1.1
4 2000/01/26 05:58:33 momjian
Exp $
* $Id: itemptr.h,v 1.1
5 2000/07/04 01:49:44 vadim
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -30,6 +30,9 @@ typedef struct ItemPointerData
...
@@ -30,6 +30,9 @@ typedef struct ItemPointerData
OffsetNumber
ip_posid
;
OffsetNumber
ip_posid
;
}
ItemPointerData
;
}
ItemPointerData
;
#define SizeOfIptrData \
(offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber))
typedef
ItemPointerData
*
ItemPointer
;
typedef
ItemPointerData
*
ItemPointer
;
/* ----------------
/* ----------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录