Re: Streaming replication status - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Streaming replication status
Date
Msg-id e51f66da1001121206w79394f1cx8f36c8587cdeda3b@mail.gmail.com
Whole thread Raw
In response to Re: Streaming replication status  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Streaming replication status  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1/12/10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Fujii Masao <masao.fujii@gmail.com> writes:
>  > I'm not sure whether poll(2) should be called for this purpose. But
>  > poll(2) and select(2) seem to often come together in the existing code.
>  > We should follow such custom?
>
>
> Yes.  poll() is usually more efficient, so it's preferred, but not all
>  platforms have it.  (On the other side, I think Windows might have
>  only poll and not select.)

FYI: on PL/Proxy we use poll() exclusively and on platforms
that dont have it (win32) we emulate poll() with select():

http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/src/poll_compat.c?rev=1.3&content-type=text/x-cvsweb-markup

End result is efficient and clean #ifdef-less code.

Something to consider.

-- 
marko


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: mailing list archiver chewing patches
Next
From: Bruce Momjian
Date:
Subject: Re: Streaming replication status