From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Perform streaming logical transactions by background workers and parallel apply |
Date: | 2022-09-22 08:57:24 |
Message-ID: | OS0PR01MB571644369FE905F1A9C92B35944E9@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, September 22, 2022 4:08 PM Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Thanks for updating the patch! Followings are comments for v33-0001.
Thanks for the comments.
> 04. HandleParallelApplyMessages()
>
> ```
> + if (winfo->error_mq_handle == NULL)
> + continue;
> ```
>
> a.
> I was not sure when the cell should be cleaned. Currently we clean up
> ParallelApplyWorkersList() only in the parallel_apply_start_worker(), but we
> have chances to remove such a cell like HandleParallelApplyMessages() or
> HandleParallelApplyMessage(). How do you think?
HandleParallelApplyxx functions are signal callback functions which I think
are unsafe to cleanup the list cells that may be in use before entering
these signal callback functions.
>
> 05. parallel_apply_setup_worker()
>
> ``
> + if (launched)
> + {
> + ParallelApplyWorkersList = lappend(ParallelApplyWorkersList,
> winfo);
> + }
> ```
>
> {} should be removed.
I think this style is fine and this was also suggested to be consistent with the
else{} part.
>
> 06. parallel_apply_wait_for_xact_finish()
>
> ```
> + /* If any workers have died, we have failed. */
> ```
>
> This function checked only about a parallel apply worker, so the comment
> should be "if worker has..."?
The comments seem clear to me as it's a general comment.
Best regards,
Hou zj
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2022-09-22 09:00:33 | Re: Perform streaming logical transactions by background workers and parallel apply |
Previous Message | Andrew Dunstan | 2022-09-22 08:29:15 | Re: [RFC] building postgres with meson - v13 |