Re: Some 9.5beta2 backend processes not terminating properly?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Shay Rojansky <roji(at)roji(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Some 9.5beta2 backend processes not terminating properly?
Date: 2016-01-02 18:00:09
Message-ID: 21365.1451757609@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On January 2, 2016 6:28:10 PM GMT+01:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 have to 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2016-01-02 18:33:47 Re: Welcome to 2016, time to run src/tools/copyright.pl
Previous Message Andres Freund 2016-01-02 17:48:33 Re: Some 9.5beta2 backend processes not terminating properly?