Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
eace269b
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,发现更多精彩内容 >>
提交
eace269b
编写于
4月 06, 2000
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Repair assert failure in tuple-chain-moving logic (introduced by yours
truly, I'm afraid).
上级
7c6bac00
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
10 deletion
+26
-10
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+26
-10
未找到文件。
src/backend/commands/vacuum.c
浏览文件 @
eace269b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.14
4 2000/03/17 02:36:06
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.14
5 2000/04/06 00:29:51
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1510,6 +1510,8 @@ vc_repair_frag(VRelStats *vacrelstats, Relation onerel,
ItemPointerSetInvalid
(
&
Ctid
);
for
(
ti
=
0
;
ti
<
num_vtmove
;
ti
++
)
{
VPageDescr
destvpd
=
vtmove
[
ti
].
vpd
;
/* Get tuple from chain */
tuple
.
t_self
=
vtmove
[
ti
].
tid
;
Cbuf
=
ReadBuffer
(
onerel
,
...
...
@@ -1521,7 +1523,7 @@ vc_repair_frag(VRelStats *vacrelstats, Relation onerel,
tuple
.
t_data
=
(
HeapTupleHeader
)
PageGetItem
(
Cpage
,
Citemid
);
tuple_len
=
tuple
.
t_len
=
ItemIdGetLength
(
Citemid
);
/* Get page to move in */
cur_buffer
=
ReadBuffer
(
onerel
,
vtmove
[
ti
].
vpd
->
vpd_blkno
);
cur_buffer
=
ReadBuffer
(
onerel
,
dest
vpd
->
vpd_blkno
);
/*
* We should LockBuffer(cur_buffer) but don't, at the
...
...
@@ -1530,9 +1532,24 @@ vc_repair_frag(VRelStats *vacrelstats, Relation onerel,
* to get t_infomask of inserted heap tuple !!!
*/
ToPage
=
BufferGetPage
(
cur_buffer
);
/* if this page was not used before - clean it */
/*
* If this page was not used before - clean it.
*
* This path is different from the other callers of
* vc_vacpage, because we have already incremented the
* vpd's vpd_offsets_used field to account for the
* tuple(s) we expect to move onto the page. Therefore
* vc_vacpage's check for vpd_offsets_used == 0 is wrong.
* But since that's a good debugging check for all other
* callers, we work around it here rather than remove it.
*/
if
(
!
PageIsEmpty
(
ToPage
)
&&
vtmove
[
ti
].
cleanVpd
)
vc_vacpage
(
ToPage
,
vtmove
[
ti
].
vpd
);
{
int
sv_offsets_used
=
destvpd
->
vpd_offsets_used
;
destvpd
->
vpd_offsets_used
=
0
;
vc_vacpage
(
ToPage
,
destvpd
);
destvpd
->
vpd_offsets_used
=
sv_offsets_used
;
}
heap_copytuple_with_tuple
(
&
tuple
,
&
newtup
);
RelationInvalidateHeapTuple
(
onerel
,
&
tuple
);
TransactionIdStore
(
myXID
,
(
TransactionId
*
)
&
(
newtup
.
t_data
->
t_cmin
));
...
...
@@ -1543,17 +1560,16 @@ vc_repair_frag(VRelStats *vacrelstats, Relation onerel,
InvalidOffsetNumber
,
LP_USED
);
if
(
newoff
==
InvalidOffsetNumber
)
{
elog
(
ERROR
,
"\
moving chain: failed to add item with len = %u to page %u"
,
tuple_len
,
vtmove
[
ti
].
vpd
->
vpd_blkno
);
elog
(
ERROR
,
"moving chain: failed to add item with len = %u to page %u"
,
tuple_len
,
destvpd
->
vpd_blkno
);
}
newitemid
=
PageGetItemId
(
ToPage
,
newoff
);
pfree
(
newtup
.
t_data
);
newtup
.
t_datamcxt
=
NULL
;
newtup
.
t_data
=
(
HeapTupleHeader
)
PageGetItem
(
ToPage
,
newitemid
);
ItemPointerSet
(
&
(
newtup
.
t_self
),
vtmove
[
ti
].
vpd
->
vpd_blkno
,
newoff
);
if
(((
int
)
vtmove
[
ti
].
vpd
->
vpd_blkno
)
>
last_move_dest_block
)
last_move_dest_block
=
vtmove
[
ti
].
vpd
->
vpd_blkno
;
ItemPointerSet
(
&
(
newtup
.
t_self
),
dest
vpd
->
vpd_blkno
,
newoff
);
if
(((
int
)
dest
vpd
->
vpd_blkno
)
>
last_move_dest_block
)
last_move_dest_block
=
dest
vpd
->
vpd_blkno
;
/*
* Set t_ctid pointing to itself for last tuple in
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录