On 26 September 2014 01:24, Jeff Janes Wrote,
>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); Thanks for the review, I have fixed this. >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. Actually this select_loop function I have implemented same as other client application are handling, i.e pg_dum in parallel.c, however parallel.c is handling the case if process is in abort (if Ctrl+c is recieved), And we need to handle the same, so I have fixed this in attached patch. >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. Apart from above mentioned reason, GetQueryResult was also not setting “SetCancelConn” as Amit has pointed, now this is also fixed. Regards, Dilip Kumar
vacuumdb_parallel_v15.patch
Description: vacuumdb_parallel_v15.patch
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers