Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
147ccf5c
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,发现更多精彩内容 >>
提交
147ccf5c
编写于
5月 29, 2000
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More vacuum cleanups
上级
f3650653
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+17
-17
未找到文件。
src/backend/commands/vacuum.c
浏览文件 @
147ccf5c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.15
0 2000/05/29 01:46:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.15
1 2000/05/29 01:55:07
momjian Exp $
*
*-------------------------------------------------------------------------
...
...
@@ -94,12 +94,12 @@ static void get_indices(Oid relid, int *nindices, Relation **Irel);
static
void
close_indices
(
int
nindices
,
Relation
*
Irel
);
static
void
get_index_desc
(
Relation
onerel
,
int
nindices
,
Relation
*
Irel
,
IndDesc
**
Idesc
);
static
void
*
vac_find_eq
(
void
*
bot
,
int
nelem
,
int
size
,
void
*
elm
,
int
(
*
compar
)
(
const
void
*
,
const
void
*
));
int
(
*
compar
)
(
const
void
*
,
const
void
*
));
static
int
vac_cmp_blk
(
const
void
*
left
,
const
void
*
right
);
static
int
vac_cmp_offno
(
const
void
*
left
,
const
void
*
right
);
static
int
vac_cmp_vtlinks
(
const
void
*
left
,
const
void
*
right
);
static
bool
vac_
enough_space
(
VPageDescr
vpd
,
Size
len
);
static
char
*
vac_
show_rusage
(
struct
rusage
*
ru0
);
static
bool
enough_space
(
VPageDescr
vpd
,
Size
len
);
static
char
*
show_rusage
(
struct
rusage
*
ru0
);
/*
...
...
@@ -1044,7 +1044,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
for
(
i
=
0
;
i
<
nusf
;
i
++
)
{
vp
=
vacuum_pages
->
vpl_pagedesc
[
i
];
if
(
vac_
enough_space
(
vp
,
min_tlen
))
if
(
enough_space
(
vp
,
min_tlen
))
{
vpage_insert
(
fraged_pages
,
vp
);
usable_free_size
+=
vp
->
vpd_free
;
...
...
@@ -1074,7 +1074,7 @@ Re-using: Free/Avail. Space %u/%u; EndEmpty/Avail. Pages %u/%u. %s",
nkeep
,
vacrelstats
->
num_vtlinks
,
ncrash
,
nunused
,
min_tlen
,
max_tlen
,
free_size
,
usable_free_size
,
empty_end_pages
,
fraged_pages
->
vpl_num_pages
,
vac_
show_rusage
(
&
ru0
));
show_rusage
(
&
ru0
));
}
...
...
@@ -1361,7 +1361,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
for
(;;)
{
if
(
to_vpd
==
NULL
||
!
vac_
enough_space
(
to_vpd
,
tlen
))
!
enough_space
(
to_vpd
,
tlen
))
{
/*
...
...
@@ -1369,7 +1369,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
* useful, remove it from fraged_pages list
*/
if
(
to_vpd
!=
NULL
&&
!
vac_
enough_space
(
to_vpd
,
vacrelstats
->
min_tlen
))
!
enough_space
(
to_vpd
,
vacrelstats
->
min_tlen
))
{
Assert
(
num_fraged_pages
>
to_item
);
memmove
(
fraged_pages
->
vpl_pagedesc
+
to_item
,
...
...
@@ -1379,7 +1379,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
}
for
(
i
=
0
;
i
<
num_fraged_pages
;
i
++
)
{
if
(
vac_
enough_space
(
fraged_pages
->
vpl_pagedesc
[
i
],
tlen
))
if
(
enough_space
(
fraged_pages
->
vpl_pagedesc
[
i
],
tlen
))
break
;
}
...
...
@@ -1650,7 +1650,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
/* try to find new page for this tuple */
if
(
cur_buffer
==
InvalidBuffer
||
!
vac_
enough_space
(
cur_page
,
tuple_len
))
!
enough_space
(
cur_page
,
tuple_len
))
{
if
(
cur_buffer
!=
InvalidBuffer
)
{
...
...
@@ -1661,7 +1661,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
* If previous target page is now too full to add *any*
* tuple to it, remove it from fraged_pages.
*/
if
(
!
vac_
enough_space
(
cur_page
,
vacrelstats
->
min_tlen
))
if
(
!
enough_space
(
cur_page
,
vacrelstats
->
min_tlen
))
{
Assert
(
num_fraged_pages
>
cur_item
);
memmove
(
fraged_pages
->
vpl_pagedesc
+
cur_item
,
...
...
@@ -1672,7 +1672,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
}
for
(
i
=
0
;
i
<
num_fraged_pages
;
i
++
)
{
if
(
vac_
enough_space
(
fraged_pages
->
vpl_pagedesc
[
i
],
tuple_len
))
if
(
enough_space
(
fraged_pages
->
vpl_pagedesc
[
i
],
tuple_len
))
break
;
}
if
(
i
==
num_fraged_pages
)
...
...
@@ -1901,7 +1901,7 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
elog
(
MESSAGE_LEVEL
,
"Rel %s: Pages: %u --> %u; Tuple(s) moved: %u. %s"
,
RelationGetRelationName
(
onerel
),
nblocks
,
blkno
,
num_moved
,
vac_
show_rusage
(
&
ru0
));
show_rusage
(
&
ru0
));
if
(
Nvpl
.
vpl_num_pages
>
0
)
{
...
...
@@ -2110,7 +2110,7 @@ scan_index(Relation indrel, int num_tuples)
elog
(
MESSAGE_LEVEL
,
"Index %s: Pages %u; Tuples %u. %s"
,
RelationGetRelationName
(
indrel
),
nipages
,
nitups
,
vac_
show_rusage
(
&
ru0
));
show_rusage
(
&
ru0
));
if
(
nitups
!=
num_tuples
)
elog
(
NOTICE
,
"Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\
...
...
@@ -2188,7 +2188,7 @@ vacuum_index(VPageList vpl, Relation indrel, int num_tuples, int keep_tuples)
elog
(
MESSAGE_LEVEL
,
"Index %s: Pages %u; Tuples %u: Deleted %u. %s"
,
RelationGetRelationName
(
indrel
),
num_pages
,
num_index_tuples
-
keep_tuples
,
tups_vacuumed
,
vac_
show_rusage
(
&
ru0
));
show_rusage
(
&
ru0
));
if
(
num_index_tuples
!=
num_tuples
+
keep_tuples
)
elog
(
NOTICE
,
"Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\
...
...
@@ -3002,7 +3002,7 @@ get_index_desc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
static
bool
vac_
enough_space
(
VPageDescr
vpd
,
Size
len
)
enough_space
(
VPageDescr
vpd
,
Size
len
)
{
len
=
MAXALIGN
(
len
);
...
...
@@ -3030,7 +3030,7 @@ vac_enough_space(VPageDescr vpd, Size len)
* threadable...
*/
static
char
*
vac_
show_rusage
(
struct
rusage
*
ru0
)
show_rusage
(
struct
rusage
*
ru0
)
{
static
char
result
[
64
];
struct
rusage
ru1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录