Re: WaitLatchOrSocket API needs more thought for socket error conditions - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: WaitLatchOrSocket API needs more thought for socket error conditions
Date
Msg-id CAEYLb_X1Fw3zrf-T6HJV_a4nb9RQu+nFROM5wRuYj66bxR0+nA@mail.gmail.com
Whole thread Raw
In response to WaitLatchOrSocket API needs more thought for socket error conditions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WaitLatchOrSocket API needs more thought for socket error conditions
List pgsql-hackers
On 13 May 2012 02:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> One possible answer is to just legislate that callers mustn't specify
> WL_SOCKET_WRITABLE without WL_SOCKET_READABLE (either just as
> documentation, or probably better with an Assert check).  The existing
> callers would all be fine with this, and I'm not sure whether there will
> ever be a case where we'd like to wait on a write-only socket.

+1 . Let the improbable requirement of being able to wait on a
write-only socket actually emerge before we engineer a solution.

I think that we might have avoided accepting the poll()-based
implementation in the first place if these subtleties were considered
earlier, since IIRC the justification for introducing it was rather
weak.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Foreign keys in pgbench
Next
From: Tom Lane
Date:
Subject: Re: WaitLatchOrSocket API needs more thought for socket error conditions