Re: Windows: Wrong error message at connection termination - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Windows: Wrong error message at connection termination
Date
Msg-id 2783154.1637189753@sss.pgh.pa.us
Whole thread Raw
In response to Re: Windows: Wrong error message at connection termination  (Thomas Munro <thomas.munro@gmail.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: XLogReadRecord() error in XlogReadTwoPhaseData()
Next
From: Mark Dilger
Date:
Subject: Re: Non-superuser subscription owners