You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Dong Li (JIRA)" <ji...@apache.org> on 2015/11/20 10:03:11 UTC
[jira] [Created] (HAWQ-176) REORGANIZE parameter is useless when
change distribute policy from hash to random
Dong Li created HAWQ-176:
----------------------------
Summary: REORGANIZE parameter is useless when change distribute policy from hash to random
Key: HAWQ-176
URL: https://issues.apache.org/jira/browse/HAWQ-176
Project: Apache HAWQ
Issue Type: Bug
Components: Storage
Reporter: Dong Li
Assignee: Lei Chang
When change distribute policy from hash to random with REORGANIZE=true, the data distribution is not reorgnized.
{code}
set default_segment_num=2;
create table testreorg( i int , j int ,q int) distributed by (q);
insert into testreorg VALUES (1,1,1);
insert into testreorg VALUES (1,2,1);
insert into testreorg VALUES (2,3,1);
insert into testreorg VALUES (2,4,1);
insert into testreorg VALUES (2,5,1);
alter TABLE testreorg set distributed by (q);
{code}
gpadmin=# select relfilenode from pg_class where relname='testreorg';
relfilenode
-------------
16840
(1 row)
gpadmin=# select * from pg_aoseg.pg_aoseg_16840;
segno | eof | tupcount | varblockcount | eofuncompressed | content
-------+-----+----------+---------------+-----------------+---------
2 | 0 | 0 | 0 | 0 | -1
1 | 160 | 5 | 5 | 160 | -1
(2 rows)
{code}
alter TABLE testreorg set with (REORGANIZE=true) DISTRIBUTED randomly;
{code}
gpadmin=# alter TABLE testreorg set with (REORGANIZE=true) DISTRIBUTED randomly;
ALTER TABLE
intern=# select relfilenode from pg_class where relname='testreorg';
relfilenode
-------------
16845
(1 row)
gpadmin=# select * from pg_aoseg.pg_aoseg_16845;
segno | eof | tupcount | varblockcount | eofuncompressed | content
-------+-----+----------+---------------+-----------------+---------
2 | 0 | 0 | 0 | 0 | -1
1 | 120 | 5 | 1 | 120 | -1
(2 rows)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)