Re: Some 9.5beta2 backend processes not terminating properly?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Some 9.5beta2 backend processes not terminating properly?
Дата
Msg-id 20160102161440.sp6bgwzl24kxa5ye@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Some 9.5beta2 backend processes not terminating properly?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2016-01-02 16:20:58 +0100, Andres Freund wrote:
> I really right now can see only two somewhat surgical fixes:
>
> 1) We do a nonblocking or select() *after* registering our events. Both
>    in WaitLatchOrSocket() and waitforsinglesocket. Since select/poll are
>    explicitly level triggered, that should make us notice any events we
>    might have missed. select() appears to have been available for a fair
>    while.
>
> 2) We explicitly shutdown(SD_BOTH) the socket whenever we get a FD_CLOSE
>    object. I *think* this should trigger errors in WSArecv, WSAEventSelect
>    et al. Doesn't solve the problem that we might miss important events
>    though.
>
>
> Given 2) isn't a complete fix and I can't find reliable documentation
> since when shutdown() is supported I'm inclined to go with 1).


Attached is an attempt to blindly implement 1). It needs some further
polishing and thought, but I'd like to verify it actually fixes things
before investing more time in this.

Greetings,

Andres Freund

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Some 9.5beta2 backend processes not terminating properly?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Welcome to 2016, time to run src/tools/copyright.pl