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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
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 22:09:08
Message-ID: 22104.1492726148@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> 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.

BTW, another amusing thing I just noted is that given a machine too old
to have poll(2), the existing coding would most likely fail outright,
because <sys/select.h> post-dates poll(2). SUSv2 specifies including
<sys/time.h> to get select(2); apparently POSIX invented <sys/select.h>
around 2001. gaur/pademelon indeed lacks <sys/select.h>, so it could
never have reached the WAIT_USE_SELECT implementation without some
readjustment of that #ifdef nest.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-04-20 22:13:17 Re: WITH clause in CREATE STATISTICS
Previous Message Tom Lane 2017-04-20 21:50:39 Re: Removing select(2) based latch (was Unportable implementation of background worker start)