Re: [HACKERS] Unportable use of select for timeouts in PostgresNode.pm - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Unportable use of select for timeouts in PostgresNode.pm
Date
Msg-id CAB7nPqRySh87HYMPKh+oj65SH-69f6c=LGNEnO+F7OaQBJg3og@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Unportable use of select for timeouts in PostgresNode.pm  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
On Mon, Jul 17, 2017 at 4:48 PM, Andrew Dunstan
<andrew.dunstan@2ndquadrant.com> wrote:
> This is a usage that is known not to work in Windows - IIRC we
> eliminated such calls from our C programs at the time of the Windows
> port - and it seems to me very likely to be the cause of the hang.
> Instead I think we should use the usleep() function from the standard
> (from 5.8) Perl module Time::HiRes, as recommended in the Perl docs for
> the sleep() function for situations where you need finer grained
> timeouts. I have verified that this works on jacana and friends.

Looking at my boxes (Arch, Mac, Windows), Time::Hires looks to be part
of the core set of packages, so there is visibly no real need to
incorporate a check in configure.in. So +1 for doing as you suggest.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Something for the TODO list: deprecating abstime and friends