Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
de09da54
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,发现更多精彩内容 >>
提交
de09da54
编写于
5月 24, 2002
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wups, managed to break ANALYZE with one aspect of that heap_fetch change.
上级
3f4d4880
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
17 deletion
+31
-17
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+24
-14
src/backend/access/index/indexam.c
src/backend/access/index/indexam.c
+5
-1
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtinsert.c
+2
-2
未找到文件。
src/backend/access/heap/heapam.c
浏览文件 @
de09da54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.13
6 2002/05/24 18:57:55
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.13
7 2002/05/24 19:52:43
tgl Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -873,15 +873,24 @@ heap_getnext(HeapScanDesc scan, ScanDirection direction)
* the tuple, fill in the remaining fields of *tuple, and check the tuple
* against the specified snapshot.
*
* If successful (tuple
passes snapshot time qual), then *userbuf is set to
*
the buffer holding the tuple and TRUE is returned. The caller must
* unpin the buffer when done with the tuple.
* If successful (tuple
found and passes snapshot time qual), then *userbuf
*
is set to the buffer holding the tuple and TRUE is returned. The caller
*
must
unpin the buffer when done with the tuple.
*
* If the tuple fails the time qual check, then FALSE will be returned.
* When the caller specifies keep_buf = true, we retain the pin on the
* buffer and return it in *userbuf (so the caller can still access the
* tuple); when keep_buf = false, the pin is released and *userbuf is set
* If the tuple is not found, then tuple->t_data is set to NULL, *userbuf
* is set to InvalidBuffer, and FALSE is returned.
*
* If the tuple is found but fails the time qual check, then FALSE will be
* returned. When the caller specifies keep_buf = true, we retain the pin
* on the buffer and return it in *userbuf (so the caller can still access
* the tuple); when keep_buf = false, the pin is released and *userbuf is set
* to InvalidBuffer.
*
* It is somewhat inconsistent that we elog() on invalid block number but
* return false on invalid item number. This is historical. The only
* justification I can see is that the caller can relatively easily check the
* block number for validity, but cannot check the item number without reading
* the page himself.
*/
bool
heap_fetch
(
Relation
relation
,
...
...
@@ -928,17 +937,18 @@ heap_fetch(Relation relation,
lp
=
PageGetItemId
(
dp
,
offnum
);
/*
* more sanity checks
* must check for deleted tuple (see for example analyze.c, which is
* careful to pass an offnum in range, but doesn't know if the offnum
* actually corresponds to an undeleted tuple).
*/
if
(
!
ItemIdIsUsed
(
lp
))
{
LockBuffer
(
buffer
,
BUFFER_LOCK_UNLOCK
);
ReleaseBuffer
(
buffer
);
elog
(
ERROR
,
"heap_fetch: invalid tuple id (%s, %lu, %u)"
,
RelationGetRelationName
(
relation
),
(
unsigned
long
)
ItemPointerGetBlockNumber
(
tid
),
offnum
);
*
userbuf
=
InvalidBuffer
;
tuple
->
t_datamcxt
=
NULL
;
tuple
->
t_data
=
NULL
;
return
false
;
}
/*
...
...
src/backend/access/index/indexam.c
浏览文件 @
de09da54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.
59 2002/05/24 18:57:55
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.
60 2002/05/24 19:52:43
tgl Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relation OID
...
...
@@ -444,6 +444,10 @@ index_getnext(IndexScanDesc scan, ScanDirection direction)
&
scan
->
xs_pgstat_info
))
break
;
/* Skip if no tuple at this location */
if
(
heapTuple
->
t_data
==
NULL
)
continue
;
/* should we raise an error instead? */
/*
* If we can't see it, maybe no one else can either. Check to see
* if the tuple is dead to all transactions. If so, signal the
...
...
src/backend/access/nbtree/nbtinsert.c
浏览文件 @
de09da54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.9
1 2002/05/24 18:57:55
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.9
2 2002/05/24 19:52:43
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -248,7 +248,7 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
elog
(
ERROR
,
"Cannot insert a duplicate key into unique index %s"
,
RelationGetRelationName
(
rel
));
}
else
else
if
(
htup
.
t_data
!=
NULL
)
{
/*
* Hmm, if we can't see the tuple, maybe it can be
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录