Re: Performance degradation in commit ac1d794 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Performance degradation in commit ac1d794
Date
Msg-id 20160114171421.GK10941@awork2.anarazel.de
Whole thread Raw
In response to Re: Performance degradation in commit ac1d794  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Performance degradation in commit ac1d794
Re: Performance degradation in commit ac1d794
Re: Performance degradation in commit ac1d794
List pgsql-hackers
On 2016-01-14 12:07:23 -0500, Robert Haas wrote:
> > Do we want to provide a backward compatible API for all this? I'm fine
> > either way.
>
> How would that work?

I'm thinking of something like;

int WaitOnLatchSet(LatchEventSet *set, int wakeEvents, long timeout);

int
WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,long timeout)
{       LatchEventSet set;
       LatchEventSetInit(&set, latch);
       if (sock != PGINVALID_SOCKET)          LatchEventSetAddSock(&set, sock);
       return WaitOnLatchSet(set, wakeEvents, timeout);
}

I think we'll need to continue having wakeEvents and timeout parameters
for WaitOnLatchSet, we quite frequently want to wait socket
readability/writability, not wait on the socket, or have/not have
timeouts.




pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: SET syntax in INSERT
Next
From: Andres Freund
Date:
Subject: Re: Performance degradation in commit ac1d794