On Wed, Jan 31, 2018 at 9:53 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Wed, Jan 31, 2018 at 3:57 AM, Amit Kapila <amit.kapil...@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