Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aJk6J-0002fI-KU for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 15:46:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aJk6J-0007Ac-0z for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 15:46:15 +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 1aJk6I-0007AV-Ei for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 15:46:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aJk6B-000898-V8 for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 15:46:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u0EFk0SL029092; Thu, 14 Jan 2016 10:46:01 -0500 From: Tom Lane To: Robert Haas cc: Andres Freund , =?UTF-8?B?0JLQsNGB0LjQu9GM0LXQsiDQlNC80LjRgtGA0LjQuQ==?= , "pgsql-hackers@postgresql.org" Subject: Re: Performance degradation in commit ac1d794 In-reply-to: References: <9F7A592C-323B-40CF-AEB6-20D28EAEFFDD@anarazel.de> <19322.1451067023@sss.pgh.pa.us> <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> Comments: In-reply-to Robert Haas message dated "Thu, 14 Jan 2016 10:39:55 -0500" Date: Thu, 14 Jan 2016 10:46:00 -0500 Message-ID: <29091.1452786360@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Robert Haas writes: > Incidentally, if we're going to whack around the latch API, it would > be nice to pick a design which wouldn't be too hard to extend to > waiting on multiple sockets. The application I have in mind is to > send of queries to several foreign servers at once and then wait until > bytes come back from any of them. It's mostly pie in the sky at this > point, but it seems highly likely to me that we'd want to do such a > thing by waiting for bytes from any of the sockets involved OR a latch > event. Instead of SetSocketToWaitOn, maybe AddSocketToWaitSet and RemoveSocketFromWaitSet? And you'd need some way of identifying which socket came ready after a wait call... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers