Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ] - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Date
Msg-id CAMkU=1wvayQ-n=yP3f4HvzhJzHBNE6FsTWc7d-r3c03bAqhQaw@mail.gmail.com
Whole thread Raw
In response to Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]  (Dilip kumar <dilip.kumar@huawei.com>)
List pgsql-hackers
On Thu, Sep 25, 2014 at 10:00 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
On Wed, Sep 24, 2014 at 2:48 AM, Dilip kumar <dilip.kumar@huawei.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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Next
From: Gregory Smith
Date:
Subject: Re: proposal: rounding up time value less than its unit.