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 2779728.1637186497@sss.pgh.pa.us
Whole thread Raw
In response to Windows: Wrong error message at connection termination  (Lars Kanis <lars@greiz-reinsdorf.de>)
List pgsql-hackers
Lars Kanis <lars@greiz-reinsdorf.de> writes:
> Explicit closing the socket before process termination leads to a 
> graceful close even on Windows. That is done by the attached patch. I 
> think delivering the correct error message to the user is much more 
> important that closing the process in sync with the socket.

Per the comment immediately above this, it's intentional that we don't
close the socket.  I'm not really convinced that this is an improvement.

Can we get anywhere by using shutdown(2) instead of close(), ie do a
half-close?  I have no idea what Windows thinks the semantics of that
are, but it might be worth trying.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: xlog.c: removing ReadRecPtr and EndRecPtr
Next
From: Thomas Munro
Date:
Subject: Re: Windows: Wrong error message at connection termination