Re: Windows: Wrong error message at connection termination

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Windows: Wrong error message at connection termination
Дата
Msg-id 1283317.1638213407@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Windows: Wrong error message at connection termination  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: Windows: Wrong error message at connection termination  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes:
> 27.11.2021 14:39, Lars Kanis wrote:
>> So I still think it's best to close the socket as proposed in the patch.

> Please see also the previous discussion of the topic:
> https://www.postgresql.org/message-id/flat/16678-253e48d34dc0c376%40postgresql.org

Hm, yeah, that discussion seems to have slipped through the cracks.
Not sure why it didn't end up in pushing something.

After re-reading that thread and re-studying relevant Windows
documentation [1][2], I think the main open question is whether
we need to issue shutdown() or not, and if so, whether to use
SD_BOTH or just SD_SEND.  I'm inclined to prefer not calling
shutdown(), because [1] is self-contradictory as to whether it
can block, and [2] is pretty explicit that it's not necessary.

            regards, tom lane

[1] https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-shutdown
[2] https://docs.microsoft.com/en-us/windows/win32/winsock/graceful-shutdown-linger-options-and-socket-closure-2



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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Lots of memory allocated when reassigning Large Objects
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Non-superuser subscription owners