Hold AccessShareLock in pg_get_expr()
In pg_get_expr(), after getting the relname, if the table that the relid tells is dropped, an error will raise later when opening the relation to get column names. pg_get_expr() is used by GPDB add-on view 'pg_partitions' which is widely used by regression tests for partition tables. Lots of parallel test cases issue view pg_partitions and drop partition tables concurrently, so those cases are very flaky. Serialize test cases will cost more testing time and be fragile, so GPDB holds a AccessShareLock here to make tests stable.
Showing
想要评论请 注册 或 登录