Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jan Lentfer <Jan(dot)Lentfer(at)web(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Date: 2014-07-18 19:58:14
Message-ID: CAMkU=1zcyU-dMHDhSnOTu4nFTcJASj3RYRN2i=8NStjRBv8y3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 16, 2014 at 5:30 AM, Dilip kumar <dilip(dot)kumar(at)huawei(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-07-18 20:24:00 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message John Cochran 2014-07-18 18:54:34 Re: Proposal for updating src/timezone