Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aJlTh-0007I6-Dd for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 17:14:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aJlTg-0002ou-Vz for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 17:14:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aJlTg-0002o2-HA for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 17:14:28 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aJlTe-0001ca-B6 for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 17:14:28 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id F3CEA860004; Thu, 14 Jan 2016 18:14:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p54BEB543.dip0.t-ipconnect.de [84.190.181.67]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id F1DE4860003; Thu, 14 Jan 2016 18:14:21 +0100 (CET) Received: by anarazel.de (Postfix, from userid 1000) id 7E178102B26; Thu, 14 Jan 2016 18:14:21 +0100 (CET) Date: Thu, 14 Jan 2016 18:14:21 +0100 From: Andres Freund To: Robert Haas Cc: Tom Lane , =?utf-8?B?0JLQsNGB0LjQu9GM0LXQsiDQlNC80LjRgtGA0LjQuQ==?= , "pgsql-hackers@postgresql.org" Subject: Re: Performance degradation in commit ac1d794 Message-ID: <20160114171421.GK10941@awork2.anarazel.de> References: <19834.1451068135@sss.pgh.pa.us> <20151225211326.z4umuafvv27nczya@alap3.anarazel.de> <24833.1451078993@sss.pgh.pa.us> <20151226112248.uv3qxmroe4va7wke@alap3.anarazel.de> <20160114143931.GG10941@awork2.anarazel.de> <20160114155617.GI10941@awork2.anarazel.de> <20160114170604.GJ10941@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers