Reduce the high cpu usage of postmaster when DTX is recovering
bgworker_should_start_mpp() is mainly used to check whether the DTX recovery process has recovered the distributed transactions and set the shmDtmStarted to true. We used to let postmaster keep trying if a DTX recovery process didn't finish and it kept postmaster in a very high CPU usage which is not cool. Because DTX recovery process is also a bgworker and a bgworker quiting will also force a call to maybe_start_bgworker(), it's unnecessary to set StartWorkerNeeded to tell postmaster keep trying.
Showing
想要评论请 注册 或 登录