Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
14cb1039
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,体验更适合开发者的 AI 搜索 >>
提交
14cb1039
编写于
7月 03, 2018
作者:
A
Adam Lee
提交者:
Adam Lee
7月 04, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
copy.c: dispatch missing AO segno map for not-partitioned tables
The map was missed by mistake, all AO loading actions need it.
上级
ebbb6719
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
25 addition
and
14 deletion
+25
-14
src/backend/commands/copy.c
src/backend/commands/copy.c
+13
-10
src/test/regress/input/gpcopy.source
src/test/regress/input/gpcopy.source
+5
-1
src/test/regress/output/gpcopy.source
src/test/regress/output/gpcopy.source
+7
-3
未找到文件。
src/backend/commands/copy.c
浏览文件 @
14cb1039
...
...
@@ -1932,7 +1932,9 @@ CopyDispatchOnSegment(CopyState cstate, const CopyStmt *stmt)
all_relids
=
list_make1_oid
(
RelationGetRelid
(
cstate
->
rel
));
/* add in AO segno map for dispatch */
if
(
dispatchStmt
->
is_from
&&
rel_is_partitioned
(
RelationGetRelid
(
cstate
->
rel
)))
if
(
dispatchStmt
->
is_from
)
{
if
(
rel_is_partitioned
(
RelationGetRelid
(
cstate
->
rel
)))
{
if
(
gp_enable_segment_copy_checking
&&
!
partition_policies_equal
(
cstate
->
rel
->
rd_cdbpolicy
,
RelationBuildPartitionDesc
(
cstate
->
rel
,
false
)))
...
...
@@ -1945,6 +1947,7 @@ CopyDispatchOnSegment(CopyState cstate, const CopyStmt *stmt)
PartitionNode
*
pn
=
RelationBuildPartitionDesc
(
cstate
->
rel
,
false
);
all_relids
=
list_concat
(
all_relids
,
all_partition_relids
(
pn
));
}
dispatchStmt
->
ao_segnos
=
assignPerRelSegno
(
all_relids
);
}
...
...
src/test/regress/input/gpcopy.source
浏览文件 @
14cb1039
...
...
@@ -293,7 +293,7 @@ COPY copy_regression_text3 from stdin with delimiter '|';
an embedded linefeed sequence\nin column a|7|c text data|d text data|e text data
\.
SELECT * FROM copy_regression_text3 ORDER BY b;
SELECT * FROM copy_regression_text3 ORDER BY b
,a
;
DROP TABLE copy_regression_text1;
DROP TABLE copy_regression_text2;
...
...
@@ -1168,3 +1168,7 @@ DROP TABLE ext_dec17;
COPY sales TO PROGRAM 'cat > /dev/null' IGNORE EXTERNAL PARTITIONS;
COPY sales TO PROGRAM 'printf <SEGID> && cat > /dev/null' ON SEGMENT IGNORE EXTERNAL PARTITIONS;
DROP TABLE sales;
CREATE TABLE ao_copy(c int) WITH (appendonly=true);
COPY ao_copy TO '/tmp/ao<SEGID>.txt' ON SEGMENT;
COPY ao_copy FROM '/tmp/ao<SEGID>.txt' ON SEGMENT;
DROP TABLE ao_copy;
src/test/regress/output/gpcopy.source
浏览文件 @
14cb1039
...
...
@@ -253,7 +253,7 @@ COPY copy_regression_text3 from stdin with delimiter '|';
-- this, but let's test it.)
COPY copy_regression_text3 from stdin with delimiter '|';
COPY copy_regression_text3 from stdin with delimiter '|';
SELECT * FROM copy_regression_text3 ORDER BY b;
SELECT * FROM copy_regression_text3 ORDER BY b
,a
;
a | b | c | d | e
------------------------------------+---+-------------+-------------+--------------
the at sign: @ | 1 | c text data | d text data | e text data
...
...
@@ -262,11 +262,11 @@ SELECT * FROM copy_regression_text3 ORDER BY b;
a single backslash \ in col a | 4 | c text data | d text data | e text data
c:\\file\data\neew\path | 5 | c text data | d text data | e text data
the at sign: @ | 6 | c text data | d text data | e text data
an embedded linefeed sequence +| 7 | c text data | d text data | e text data
in column a | | | |
an embedded linefeed +| 7 | c text data | d text data | e text data
and another one +| | | |
in column a | | | |
an embedded linefeed sequence +| 7 | c text data | d text data | e text data
in column a | | | |
a single backslash \ in col a | 8 | c text data | d text data | e text data
(9 rows)
...
...
@@ -1352,3 +1352,7 @@ NOTICE: COPY ignores external partition(s)
COPY sales TO PROGRAM 'printf <SEGID> && cat > /dev/null' ON SEGMENT IGNORE EXTERNAL PARTITIONS;
NOTICE: COPY ignores external partition(s)
DROP TABLE sales;
CREATE TABLE ao_copy(c int) WITH (appendonly=true);
COPY ao_copy TO '/tmp/ao<SEGID>.txt' ON SEGMENT;
COPY ao_copy FROM '/tmp/ao<SEGID>.txt' ON SEGMENT;
DROP TABLE ao_copy;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录