Re: WaitLatchOrSocket API needs more thought for socket error conditions

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WaitLatchOrSocket API needs more thought for socket error conditions
Date: 2012-05-13 18:02:34
Message-ID: CAEYLb_X1Fw3zrf-T6HJV_a4nb9RQu+nFROM5wRuYj66bxR0+nA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 May 2012 02:48, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-05-13 18:11:52 Re: WaitLatchOrSocket API needs more thought for socket error conditions
Previous Message Jeff Janes 2012-05-13 17:07:21 Foreign keys in pgbench