On Wed, Jul 16, 2014 at 5:30 AM, Dilip kumar <dilip.ku...@huawei.com> wrote:
> On 16 July 2014 12:13 Magnus Hagander Wrote, > > >>Yeah, those are exactly my points. I think it would be significantly > simpler to do it that way, rather than forking and threading. And also > easier to make portable... > > >>(and as a optimization on Alvaros suggestion, you can of course reuse > the initial connection as one of the workers as long as you got the full > list of tasks from it up front, which I think you do anyway in order to do > sorting of tasks...) > > Oh, I got your point, I will update my patch and send, > > Now we can completely remove vac_parallel.h file and no need of > refactoring also:) > > Thanks & Regards, > > Dilip Kumar > Should we push the refactoring through anyway? I have a hard time believing that pg_dump is going to be the only client program we ever have that will need process-level parallelism, even if this feature itself does not need it. Why make the next person who comes along re-invent that re-factoring of this wheel? Cheers, Jeff