On Wed, Oct 12, 2022 at 7:41 AM wangw.f...@fujitsu.com <wangw.f...@fujitsu.com> wrote: > > On Fri, Oct 7, 2022 at 14:18 PM Hou, Zhijie/侯 志杰 <houzj.f...@cn.fujitsu.com> > wrote: > > Attach the new version patch set which addressed most of the comments. > > Rebased the patch set because the new change in HEAD (776e1c8). > > Attach the new patch set. >
+static void +HandleParallelApplyMessage(ParallelApplyWorkerInfo *winfo, StringInfo msg) { ... + case 'X': /* Terminate, indicating clean exit */ + { + shm_mq_detach(winfo->error_mq_handle); + winfo->error_mq_handle = NULL; + break; + } ... } I don't see the use of this message in the patch. If this is not required by the latest version then we can remove it and its corresponding handling in parallel_apply_start_worker(). I am referring to the below code in parallel_apply_start_worker(): + if (tmp_winfo->error_mq_handle == NULL) + { + /* + * Release the worker information and try next one if the parallel + * apply worker exited cleanly. + */ + ParallelApplyWorkersList = foreach_delete_current(ParallelApplyWorkersList, lc); + shm_mq_detach(tmp_winfo->mq_handle); + dsm_detach(tmp_winfo->dsm_seg); + pfree(tmp_winfo); + } -- With Regards, Amit Kapila.