Re: [HACKERS] WaitLatchOrSocket API needs more thought for socket error conditions

2012-05-13 Thread Tom Lane
Peter Geoghegan writes: > 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. I'm not exactly sure that the select-based implementation i

Re: [HACKERS] WaitLatchOrSocket API needs more thought for socket error conditions

2012-05-13 Thread Peter Geoghegan
On 13 May 2012 02:48, Tom Lane 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

[HACKERS] WaitLatchOrSocket API needs more thought for socket error conditions

2012-05-12 Thread Tom Lane
After further consideration, I think the patch I committed here: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=31ad6553646c81f3ce8fccf8aef1a1134a7864c7 may have been an overly hasty band-aid rather than a good fix. The question that needs to be faced is: what should WaitLatchOrS