• H
    Cleanup idle reader gang after utility statements · d1ba4da5
    Hubert Zhang 提交于
    Reader gangs use local snapshot to access catalog, as a result, it will
    not synchronize with the sharedSnapshot from write gang which will
    lead to inconsistent visibility of catalog table on idle reader gang.
    Considering the case:
    
    select * from t, t t1; -- create a reader gang.
    begin;
    create role r1;
    set role r1;  -- set command will also dispatched to idle reader gang
    
    When set role command dispatched to idle reader gang, reader gang
    cannot see the new tuple t1 in catalog table pg_auth.
    To fix this issue, we should drop the idle reader gangs after each
    utility statement which may modify the catalog table.
    Reviewed-by: NZhenghua Lyu <zlv@pivotal.io>
    d1ba4da5
guc_gp.out 12.7 KB