Re: Perform streaming logical transactions by background workers and parallel apply
| От | Amit Kapila |
|---|---|
| Тема | Re: Perform streaming logical transactions by background workers and parallel apply |
| Дата | |
| Msg-id | CAA4eK1Jp4xEC_hJvanrcroo-DGX8CMjZw_D4SqZOe7Az+xrPQA@mail.gmail.com обсуждение исходный текст |
| Ответ на | RE: Perform streaming logical transactions by background workers and parallel apply ("wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>) |
| Ответы |
RE: Perform streaming logical transactions by background workers and parallel apply
|
| Список | pgsql-hackers |
On Wed, Oct 12, 2022 at 7:41 AM wangw.fnst@fujitsu.com
<wangw.fnst@fujitsu.com> wrote:
>
> On Fri, Oct 7, 2022 at 14:18 PM Hou, Zhijie/侯 志杰 <houzj.fnst@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.
В списке pgsql-hackers по дате отправления: