Cleanup idle reader gang after utility statements
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>
Showing
想要评论请 注册 或 登录