• W
    GPDB GUC dispatching flag refactor · 750647bb
    Weinan WANG 提交于
    
    So far, we use to dispatch a guc when creating gang if its flag contains
    GUC_GPDB_ADDOPT. It has some drawbacks.
    1. This flag left a lots footprint in guc.c, when we diff upstream code.
    2. It is easy to forget marking it when new guc introduce.
    
    To deal with these issues, and also this PR is the first step of
    [PR7184](https://github.com/greenplum-db/gpdb/pull/7184).
    
    Rename GUC_GPDB_ADDOPT flag as GUC_GPDB_NEED_SYNC, as well as, declare a new
    guc flag named GUC_GPDB_NO_SYNC. For the predefine guc in guc.c and guc_gp.c
    must explicitly assign one of these two flags.
    For custom guc, give a default flag, GUC_GPDB_NO_SYNC, if it does not
    explicit set.
    
    Instead of the direct set flag in guc.c, we define two array, sync_guc_names_array
    and unsync_guc_names_array.To recode guc names into and automatically
    assign flag when the guc object is built in Postgres. Hence, we can
    reduce footprint when diffing with upstream guc.c
    
    Idea from Heikki Linnakangas <hlinnakangas@pivotal.io>
    Idea from Hubert Zhang <hzhang@pivotal.io>
    750647bb
sync_guc_name.h 3.2 KB