Re: Windows: Wrong error message at connection termination

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Windows: Wrong error message at connection termination
Дата
Msg-id 2783154.1637189753@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Windows: Wrong error message at connection termination  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> Interesting discovery.  I think you might get the same behaviour from
> a Unix system if you set SO_LINGER to 0 before you exit[1].  I suppose
> if a TCP implementation is partially in user space (I have no idea if
> this is true for Windows, I never use it, but I recall that Winsock
> was at some point a DLL) and can't handle the existence of any socket
> state after the process is gone, you might want to nuke everything and
> tell the peer immediately that you're doing so on exit?

It's definitely plausible that Windows does this because it can't
handle retransmits once the sender's state is gone.  However, it
seems to me that any such state would be tied to the open socket,
not to the sender process as such.  Which would suggest that an
early close() as Lars suggests would make things worse not better.
This is all just speculation unfortunately.  (Man, I hate dealing
with closed-source software.)

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: XLogReadRecord() error in XlogReadTwoPhaseData()
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: Non-superuser subscription owners