• D
    gpinitsystem -I should respect master dbid != 1 · 00ae3013
    dh-cloud 提交于
    Looking at GP documents, there is no indication that master dbid
    must be 1. However, when CREATE_QD_DB, gpinitsystem always writes
    "gp_dbid=1" into file `internal.auto.conf` even if we specify:
    
    ```
    mdw~5432~/data/master/gpseg-1~2~-1
     OR
    mdw~5432~/data/master/gpseg-1~0~-1
    ```
    
    But catalog gp_segment_configuration can have the correct master
    dbid value (2 or 0), the mismatch causes gpinitsystem hang.
    Users can run into such problem for their first time to use
    gpinitsystem -I.
    
    Here we test dbid 0, because PostmasterMain() will simply check
    dbid >= 0 (non-utility mode), it says:
    
    > This value must be >= 0, or >= -1 in utility mode
    
    It seems 0 is a valid value.
    
    Changes:
    
    - use specified master dbid field when CREATE_QD_DB.
    - remove unused macros MASTER_DBID, InvalidDbid in C sources.
    Reviewed-by: NAshwin Agrawal <aashwin@vmware.com>
    00ae3013
regress_gp.c 56.7 KB