pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on

pgsql: Fix lost Windows socket EOF events.

2024-07-12 Thread Thomas Munro
Fix lost Windows socket EOF events. Winsock only signals an FD_CLOSE event once if the other end of the socket shuts down gracefully. Because each WaitLatchOrSocket() call constructs and destroys a new event handle every time, with unlucky timing we can lose it and hang. We get away with this on