Release locks when exiting from FileRepPrimary_IsMirroringRequired()
Commit d09cf2e6 introduced proc_exit(0) based on the check that postmaster is not alive and the segment is at fault. The check for postmaster being alive is incorrect when passed true for `PostmasterIsAlive()` in case of resync worker as resync workers are not direct children on postmaster. Because of the incorrect check proc_exit(0) is called always for resync worker when segment is in fault. Also, the locks are not released while exiting which might cause other backends `StartTransaction()` to hang due to virtual xact lock. Fixes #1791
Showing
想要评论请 注册 或 登录