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

Поиск
Список
Период
Сортировка
От Dilip kumar
Тема Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Дата
Msg-id 4205E661176A124FAF891E0A6BA9135266363710@szxeml509-mbs.china.huawei.com
обсуждение исходный текст
Ответ на Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers

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

 

 

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Corporate and Individual Contributor License Agreements (CLAs)
Следующее
От: Dilip kumar
Дата:
Сообщение: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]