RE: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL
Date
Msg-id OS0PR01MB57165F5CC0C9A9C3E96A939B94FC9@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL  (Ted Yu <yuzhihong@gmail.com>)
Responses Re: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL
List pgsql-hackers
On Wednesday, January 11, 2023 10:21 AM Ted Yu <yuzhihong@gmail.com> wrote:
>         /* First time through, initialize parallel apply worker state hashtable. */
>         if (!ParallelApplyTxnHash)
> 
> I think it would be better if `ParallelApplyTxnHash` is created by the first
> successful parallel apply worker.

Thanks for the suggestion. But I am not sure if it's worth to changing the
order here, because It will only optimize the case where user enable parallel
apply but never get an available worker which should be rare. And in such a
case, it'd be better to increase the number of workers or disable the parallel mode.

Best Regards,
Hou zj

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can we let extensions change their dumped catalog schemas?
Next
From: John Naylor
Date:
Subject: Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG