Re: Some 9.5beta2 backend processes not terminating properly? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some 9.5beta2 backend processes not terminating properly?
Date
Msg-id 21365.1451757609@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some 9.5beta2 backend processes not terminating properly?  (Andres Freund <andres@anarazel.de>)
Responses Re: Some 9.5beta2 backend processes not terminating properly?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On January 2, 2016 6:28:10 PM GMT+01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Indeed.  It doesn't look like any of the cleanup I suggested in that
>> thread has ever gotten done.  I suspect that we'll continue to see
>> problems until we get rid of the transient event object attachments.

> That'd address some of the problem, but that'd not address the edge triggered behaviour of FD-CLOSE. I think we'll
haveto abstract away windows sockets, and store the event & state there.
 

Right.  What I wrote in the 2012 thread was

: More generally, it seems clear to me that Microsoft's code is designed
: around the assumption that an event object remains attached to a socket
: for the lifetime of the socket.  This business of transiently associating
: event objects with sockets looks quite inefficient and is evidently
: triggering a lot of unpleasant corner-case behaviors.  I wonder whether we
: should not try to make "pgsocket" encapsulate a socket and an associated
: event object as a single entity on Windows.  (Such a struct would be a
: good place to keep a per-socket noblock flag, too.)  I'm not going to
: tackle that myself though.

which I think is the same as what you're suggesting.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?
Next
From: Bruce Momjian
Date:
Subject: Re: Welcome to 2016, time to run src/tools/copyright.pl