You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Lei Chang (JIRA)" <ji...@apache.org> on 2016/04/10 11:58:25 UTC

[jira] [Updated] (HAWQ-176) REORGANIZE parameter is useless when change distribute policy from hash to random

     [ https://issues.apache.org/jira/browse/HAWQ-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lei Chang updated HAWQ-176:
---------------------------
    Fix Version/s:     (was: backlog)
                   2.0.0

> 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
>             Fix For: 2.0.0
>
>
> When change distribute policy from hash to random with REORGANIZE=true, the data distribution is not reorgnized.
> Run commands as follow.
> {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);
> {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=# 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)
> The aoseg file is changed , but the data distribution has not changed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)