Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
d8dbbc8c
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,发现更多精彩内容 >>
提交
d8dbbc8c
编写于
8月 28, 1998
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vacuum fix.
上级
a53ea467
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
23 deletion
+21
-23
src/backend/catalog/index.c
src/backend/catalog/index.c
+14
-10
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+7
-13
未找到文件。
src/backend/catalog/index.c
浏览文件 @
d8dbbc8c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.5
6 1998/08/28 03:36:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.5
7 1998/08/28 04:57:19
momjian Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -1267,6 +1267,7 @@ FormIndexDatum(int numberOfAttributes,
FuncIndexInfoPtr
fInfo
)
{
AttrNumber
i
;
int
offset
;
bool
isNull
;
/* ----------------
...
...
@@ -1276,16 +1277,19 @@ FormIndexDatum(int numberOfAttributes,
* ----------------
*/
for
(
i
=
0
;
i
<
numberOfAttributes
;
i
++
)
for
(
i
=
1
;
i
<=
numberOfAttributes
;
i
++
)
{
datum
[
i
]
=
PointerGetDatum
(
GetIndexValue
(
heapTuple
,
heapDescriptor
,
i
,
attributeNumber
,
fInfo
,
&
isNull
));
nullv
[
i
]
=
(
isNull
)
?
'n'
:
' '
;
offset
=
AttrNumberGetAttrOffset
(
i
);
datum
[
offset
]
=
PointerGetDatum
(
GetIndexValue
(
heapTuple
,
heapDescriptor
,
offset
,
attributeNumber
,
fInfo
,
&
isNull
));
nullv
[
offset
]
=
(
isNull
)
?
'n'
:
' '
;
}
}
...
...
src/backend/commands/vacuum.c
浏览文件 @
d8dbbc8c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.7
7 1998/08/28 03:36:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.7
8 1998/08/28 04:57:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -20,6 +20,7 @@
#include "postgres.h"
#include "miscadmin.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/transam.h"
...
...
@@ -189,8 +190,8 @@ vc_init()
if
((
fd
=
open
(
"pg_vlock"
,
O_CREAT
|
O_EXCL
,
0600
))
<
0
)
{
elog
(
ERROR
,
"Can't create lock file. Is another vacuum cleaner running?
\n
\
\t
If not, you may remove the pg_vlock file in the
pgsql/data/base/your_db
\n
\
\t
directory"
);
\t
If not, you may remove the pg_vlock file in the
%s
\n
\
\t
directory"
,
DatabasePath
);
}
close
(
fd
);
...
...
@@ -2202,11 +2203,10 @@ static void
vc_mkindesc
(
Relation
onerel
,
int
nindices
,
Relation
*
Irel
,
IndDesc
**
Idesc
)
{
IndDesc
*
idcur
;
HeapTuple
tuple
,
cachetuple
;
HeapTuple
cachetuple
;
AttrNumber
*
attnumP
;
int
natts
;
int
i
;
Buffer
buffer
;
*
Idesc
=
(
IndDesc
*
)
palloc
(
nindices
*
sizeof
(
IndDesc
));
...
...
@@ -2216,13 +2216,8 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
ObjectIdGetDatum
(
RelationGetRelid
(
Irel
[
i
])),
0
,
0
,
0
);
Assert
(
cachetuple
);
/* get the buffer cache tuple */
tuple
=
heap_fetch
(
onerel
,
SnapshotNow
,
&
cachetuple
->
t_ctid
,
&
buffer
);
Assert
(
tuple
);
pfree
(
cachetuple
);
idcur
->
tform
=
(
IndexTupleForm
)
GETSTRUCT
(
tuple
);
/* we never free the copy we make, because Idesc needs it for later */
idcur
->
tform
=
(
IndexTupleForm
)
GETSTRUCT
(
cachetuple
);
for
(
attnumP
=
&
(
idcur
->
tform
->
indkey
[
0
]),
natts
=
0
;
*
attnumP
!=
InvalidAttrNumber
&&
natts
!=
INDEX_MAX_KEYS
;
attnumP
++
,
natts
++
);
...
...
@@ -2238,7 +2233,6 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
idcur
->
finfoP
=
(
FuncIndexInfo
*
)
NULL
;
idcur
->
natts
=
natts
;
ReleaseBuffer
(
buffer
);
}
}
/* vc_mkindesc */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录