Re: Wait for parallel workers to attach

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Wait for parallel workers to attach
Дата
Msg-id CAA4eK1LVB3VF1zQKvThkg0JSaayMU9bvycN2-jYKXnpq0ACJeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Wait for parallel workers to attach  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Wait for parallel workers to attach  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Jan 31, 2018 at 9:53 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Jan 31, 2018 at 3:57 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>> * There might be some opportunity to share some of the new code with
>>> the code recently committed to WaitForParallelWorkersToFinish(). For
>>> one thing, the logic in this block could be refactored into a
>>> dedicated function that is called by both
>>> WaitForParallelWorkersToAttach() and WaitForParallelWorkersToFinish():
>>
>> I had thought about this earlier but left it as the common code was
>> too less, however as you have pointed out, I had extracted the common
>> code into a separate function.
>
> I like it better the other way, so I've changed it back in the
> attached version,
>

Okay, no problem.

> which also works over the comments fairly heavily.
>

+ * However, if the leader needs to wait for
+ * all of its workers or for a specific worker, it may want to call this
+ * function before doing so.

I think suggesting to use this API to wait "for a specific worker"
doesn't seem like a good idea as it doesn't have any such provision.
Other than that the patch looks good.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CURRENT OF causes an error when IndexOnlyScan is used
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] why not parallel seq scan for slow functions