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

From: Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: 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 04:52:18
Message-ID: 4205E661176A124FAF891E0A6BA91352663442C4@szxeml509-mbs.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 sorting of tasks...)

I have modified the patch as per the suggestion,

Now in beginning we create all connections, and first connection we use for getting table list in beginning, After that all connections will be involved in vacuum task.

Please have a look and provide your opinion…

Thanks & Regards,

Dilip Kumar

Attachment Content-Type Size
vacuumdb_parallel_v11.patch application/octet-stream 19.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2014-07-18 05:26:25 Re: Portability issues in TAP tests
Previous Message Amit Kapila 2014-07-18 03:33:35 Re: [bug fix] pg_ctl always uses the same event source