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: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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-09-25 19:54:16
Message-ID: CAMkU=1wvayQ-n=yP3f4HvzhJzHBNE6FsTWc7d-r3c03bAqhQaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 25, 2014 at 10:00 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Wed, Sep 24, 2014 at 2:48 AM, Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>
> wrote:
>
>> On 24 August 2014 11:33, Amit Kapila Wrote
>>
>>
>>
>> Thanks for you comments, i have worked on both the review comment lists,
>> sent on 19 August, and 24 August.
>>
>>
>>
>> Latest patch is attached with the mail..
>>
>
> Hi Dilip,
>
> I think you have an off-by-one error in the index into the array of file
> handles.
>

Actually the problem is that the socket for the master connection was not
getting initialized, see my one line addition here.

connSlot = (ParallelSlot*)pg_malloc(concurrentCons *
sizeof(ParallelSlot));
connSlot[0].connection = conn;
+ connSlot[0].sock = PQsocket(conn);

However, I don't think it is good to just ignore errors from the select
call (like the EBADF) and go into a busy loop instead, so there are more
changes needed than this.

Also, cancelling the run (by hitting ctrl-C in the shell that invoked it)
does not seem to work on linux. I get a message that says "Cancel request
sent", but then it continues to finish the job anyway.

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Smith 2014-09-25 20:19:24 Re: proposal: rounding up time value less than its unit.
Previous Message Peter Geoghegan 2014-09-25 19:38:54 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}