Update pre-allocated shared snapshot slot number.
Previously it used max_prepared_xacts for shared snapshot slot number. The
reason that it does not use MaxBackends, per comment, is that ideally on QE we
want to use QD MaxBackends for the slot number, and note usually QE MaxBackends
should be greater than QD MaxBackends due to potential multiple gangs per
query. The code previously used max_prepared_xacts finally for the shared
snapshot slot number calculation. That is not correctly given we have read-only
query, and we have one-phase commit now. Let's use MaxBackends for shared
snapshot slot number calculation for safety though this might waste some memory.
Reviewed-by: Nxiong-gang <gxiong@pivotal.io>
Showing
想要评论请 注册 或 登录