Fix "Too many distributed transactions for snapshot" (#10500)
Now that we do not have to use full gang for distributed transaction, that makes in-progress distributed transaction on master might be greater than max_prepared_xacts if max_prepared_xacts is configured with a small value. max_prepared_xacts is used to as the inProgressXidArray length for distributed snapshot. This might lead to distributed snapshot creation failure due to "Too many distributed transactions for snapshot" if the system is in heavy 2pc load. Fixing this by using GetMaxSnapshotXidCount() for the length of array inProgressXidArray, following the setting on master. This fixes github issue https://github.com/greenplum-db/gpdb/issues/10057 No test for this since test isolation2:prepare_limit already covered this. (I encountered this issue when backporting a PR that introduces the test isolation2:prepare_limit, so need to push this at first then the backporting PR). Reviewed-by: NHubert Zhang <hzhang@pivotal.io>
Showing
想要评论请 注册 或 登录