On Thu, Sep 25, 2014 at 10:00 AM, Jeff Janes <jeff.ja...@gmail.com> wrote:
> On Wed, Sep 24, 2014 at 2:48 AM, Dilip kumar <dilip.ku...@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