hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From realdawn <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-360. Fixed Data loss when alter ...
Date Fri, 29 Jan 2016 03:03:08 GMT
GitHub user realdawn opened a pull request:


    HAWQ-360. Fixed Data loss when alter partition table by add two column in one time.

    When executing the sql "alter table part_1 add column p int default 3,add column q int
default 4;" , the executing process has tow phases. 
    Phase 1:
    create a pg_tmp_1 table
    create pg_temp_1's aoseg table
    copy every column in origin table with adding a column p to pg_temp_1 table
    update its aoseg table
    Phase 2:
    create a pg_temp_2 table
    create its pg_temp_2's aoseg table
    copy every column in pg_temp_1 with adding a column q to pg_temp_2 table.
    update its aoseg table
    However, with using previous code, by the 3rd step in phase2 it use ActiveSnapshot, which
means it can't get the latest aoseg table of pg_temp_1.  As a result, it cause data loss.
    So I modify it by using SnapshotSelf.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/realdawn/incubator-hawq HAWQ-360

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #304
commit 2404fb5daf11dc2bdc50271daf7f99e8e824c572
Author: doli <doli@pivotal.io>
Date:   2016-01-29T02:50:17Z

    HAWQ-360. Fixed Data loss when alter partition table by add two column in one time.


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message