Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
88b49cdc
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,发现更多精彩内容 >>
提交
88b49cdc
编写于
6月 28, 2005
作者:
T
Teodor Sigaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code cleanup. gistfillbuffer accepts InvalidOffsetNumber.
上级
365205dd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
30 deletion
+16
-30
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+5
-10
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistutil.c
+5
-1
src/backend/access/gist/gistvacuum.c
src/backend/access/gist/gistvacuum.c
+2
-7
src/backend/access/gist/gistxlog.c
src/backend/access/gist/gistxlog.c
+4
-12
未找到文件。
src/backend/access/gist/gist.c
浏览文件 @
88b49cdc
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.12
2 2005/06/27 12:45:21
teodor Exp $
* $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.12
3 2005/06/28 15:51:00
teodor Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -421,13 +421,10 @@ gistplacetopage(GISTInsertState *state, GISTSTATE *giststate) {
else
{
/* enough space */
OffsetNumber
l
,
off
;
XLogRecPtr
oldlsn
;
off
=
(
PageIsEmpty
(
state
->
stack
->
page
)
)
?
FirstOffsetNumber
:
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
state
->
stack
->
page
));
l
=
gistfillbuffer
(
state
->
r
,
state
->
stack
->
page
,
state
->
itup
,
state
->
ituplen
,
off
);
gistfillbuffer
(
state
->
r
,
state
->
stack
->
page
,
state
->
itup
,
state
->
ituplen
,
InvalidOffsetNumber
);
oldlsn
=
PageGetLSN
(
state
->
stack
->
page
);
if
(
!
state
->
r
->
rd_istemp
)
{
OffsetNumber
noffs
=
0
,
offs
[
MAXALIGN
(
sizeof
(
OffsetNumber
)
)
/
sizeof
(
OffsetNumber
)
];
...
...
@@ -999,10 +996,9 @@ gistSplit(Relation r,
}
else
{
OffsetNumber
l
;
char
*
ptr
;
l
=
gistfillbuffer
(
r
,
right
,
rvectup
,
v
.
spl_nright
,
FirstOffsetNumber
);
gistfillbuffer
(
r
,
right
,
rvectup
,
v
.
spl_nright
,
FirstOffsetNumber
);
/* XLOG stuff */
ROTATEDIST
(
*
dist
);
(
*
dist
)
->
block
.
blkno
=
BufferGetBlockNumber
(
rightbuf
);
...
...
@@ -1035,10 +1031,9 @@ gistSplit(Relation r,
}
else
{
OffsetNumber
l
;
char
*
ptr
;
l
=
gistfillbuffer
(
r
,
left
,
lvectup
,
v
.
spl_nleft
,
FirstOffsetNumber
);
gistfillbuffer
(
r
,
left
,
lvectup
,
v
.
spl_nleft
,
FirstOffsetNumber
);
/* XLOG stuff */
ROTATEDIST
(
*
dist
);
(
*
dist
)
->
block
.
blkno
=
BufferGetBlockNumber
(
leftbuf
);
...
...
src/backend/access/gist/gistutil.c
浏览文件 @
88b49cdc
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.
3 2005/06/27 12:45:22
teodor Exp $
* $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.
4 2005/06/28 15:51:00
teodor Exp $
*-------------------------------------------------------------------------
*/
#include "postgres.h"
...
...
@@ -62,6 +62,10 @@ gistfillbuffer(Relation r, Page page, IndexTuple *itup,
OffsetNumber
l
=
InvalidOffsetNumber
;
int
i
;
if
(
off
==
InvalidOffsetNumber
)
off
=
(
PageIsEmpty
(
page
)
)
?
FirstOffsetNumber
:
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
page
));
for
(
i
=
0
;
i
<
len
;
i
++
)
{
l
=
PageAddItem
(
page
,
(
Item
)
itup
[
i
],
IndexTupleSize
(
itup
[
i
]),
...
...
src/backend/access/gist/gistvacuum.c
浏览文件 @
88b49cdc
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.
3 2005/06/27 12:45:22
teodor Exp $
* $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.
4 2005/06/28 15:51:00
teodor Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -199,12 +199,7 @@ gistVacuumUpdate( GistVacuum *gv, BlockNumber blkno, bool needunion ) {
needunion
=
false
;
/* gistSplit already forms unions */
}
else
{
/* enough free space */
OffsetNumber
off
=
(
PageIsEmpty
(
page
))
?
FirstOffsetNumber
:
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
page
));
gistfillbuffer
(
gv
->
index
,
page
,
addon
,
curlenaddon
,
off
);
gistfillbuffer
(
gv
->
index
,
page
,
addon
,
curlenaddon
,
InvalidOffsetNumber
);
}
}
}
...
...
src/backend/access/gist/gistxlog.c
浏览文件 @
88b49cdc
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.
4 2005/06/27 12:45:22
teodor Exp $
* $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.
5 2005/06/28 15:51:00
teodor Exp $
*-------------------------------------------------------------------------
*/
#include "postgres.h"
...
...
@@ -198,14 +198,8 @@ gistRedoEntryUpdateRecord(XLogRecPtr lsn, XLogRecord *record, bool isnewroot) {
}
/* add tuples */
if
(
xlrec
.
len
>
0
)
{
OffsetNumber
off
=
(
PageIsEmpty
(
page
))
?
FirstOffsetNumber
:
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
page
));
gistfillbuffer
(
reln
,
page
,
xlrec
.
itup
,
xlrec
.
len
,
off
);
}
if
(
xlrec
.
len
>
0
)
gistfillbuffer
(
reln
,
page
,
xlrec
.
itup
,
xlrec
.
len
,
InvalidOffsetNumber
);
/* special case: leafpage, nothing to insert, nothing to delete, then
vacuum marks page */
...
...
@@ -623,9 +617,7 @@ gistContinueInsert(gistIncompleteInsert *insert) {
}
}
}
else
gistfillbuffer
(
index
,
pages
[
numbuffer
-
1
],
itup
,
lenitup
,
(
PageIsEmpty
(
pages
[
numbuffer
-
1
]))
?
FirstOffsetNumber
:
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
pages
[
numbuffer
-
1
]))
);
gistfillbuffer
(
index
,
pages
[
numbuffer
-
1
],
itup
,
lenitup
,
InvalidOffsetNumber
);
lenitup
=
numbuffer
;
for
(
j
=
0
;
j
<
numbuffer
;
j
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录