Re: Removing select(2) based latch (was Unportable implementation of background worker start)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Removing select(2) based latch (was Unportable implementation of background worker start)
Date: 2017-04-20 21:35:46
Message-ID: 20170420213546.bfeau3a42tczfuf5@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2017-04-20 17:27:42 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2017-04-19 20:06:05 -0400, Tom Lane wrote:
> >> We should check the buildfarm to see if the select() implementation is
> >> being tested at all.
>
> > I verified it's currently not (unless I made a mistake):
>
> I did my own checking, and concur that only the MinGW buildfarm members
> are reporting lacking poll(2) or poll.h. Since they also report lacking
> sys/select.h, they must be falling through to the WAIT_USE_WIN32
> implementation. So the WAIT_USE_SELECT implementation is going untested
> in the buildfarm, and has been since before the WaitEventSet API existed
> (I checked buildfarm records back to the start of 2016).

Similarly with the SELECT based unix_latch.c code before...

> In short: yeah, let's nuke the WAIT_USE_SELECT implementation.
> It's dead code and it's unlikely to get resurrected.

Ok, cool. v10 or wait till v11? I see very little reason to wait
personally.

> BTW, noting that SUSv2 specifies <poll.h> not <sys/poll.h>, I wonder
> whether we couldn't drop configure's test for the latter along with
> the
>
> #ifdef HAVE_SYS_POLL_H
> #include <sys/poll.h>
> #endif
>
> stanzas we have in a couple of places. But that's a separate issue.

Seems like a good idea, a quick select confirms there's no !win
buildfarm animals without poll.h.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-04-20 21:47:00 Re: Use sync commit for logical replication apply in TAP tests
Previous Message Peter Eisentraut 2017-04-20 21:30:24 Re: DROP SUBSCRIPTION, query cancellations and slot handling