Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coxAk-0000u5-Mk for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 19:04:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coxAj-0005wy-Vd for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 19:04:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coxAj-0005wo-3J for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 19:04:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coxAc-00035M-Df for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 19:04:19 +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 v2HJ4CfY025653; Fri, 17 Mar 2017 15:04:12 -0400 From: Tom Lane To: Andrew Dunstan cc: Petr Jelinek , Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver In-reply-to: <927edd39-ed04-ea57-a98c-638eb0365431@2ndQuadrant.com> References: <19403.1488586564@sss.pgh.pa.us> <34d98fbf-9195-04d2-b85a-634d6952ffdf@2ndquadrant.com> <19815.1488600693@sss.pgh.pa.us> <4144256b-dc4f-892c-a720-71f6e7b9ac87@2ndquadrant.com> <3ffe98f7-d2ed-65c6-51f3-4d97ffd6e312@2ndquadrant.com> <34591606-976a-bbee-8eda-778c1e1fc52f@2ndQuadrant.com> <10458.1489763266@sss.pgh.pa.us> <5b6a6d6d-fb45-0afb-2e95-5600063c3dbd@2ndquadrant.com> <13398.1489768097@sss.pgh.pa.us> <927edd39-ed04-ea57-a98c-638eb0365431@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Fri, 17 Mar 2017 14:51:54 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25651.1489777452.1@sss.pgh.pa.us> Date: Fri, 17 Mar 2017 15:04:12 -0400 Message-ID: <25652.1489777452@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 Andrew Dunstan writes: > On 03/17/2017 12:28 PM, Tom Lane wrote: >> I'll add some comments and push this. Does everyone agree that >> this had better get back-patched, too? > Confirmed that this fixes the problem on jacana. > +1 for backpatching. I've pushed this into 9.6, but the WaitEventSet code doesn't exist before that. It might be that we should apply a similar fix to the predecessor code, but I'm not really excited about it given that we have no indication that the bug can be hit in the older branches. Anyway, lacking a Windows machine to test on, I have no interest in trying to make such a patch blindly. > Does that mean we could remove the special logic in pgstat.c? If you mean the bit near line 3930 about * Windows, at least in its Windows Server 2003 R2 incarnation, * sometimes loses FD_READ events. Waking up and retrying the recv() * fixes that, so don't sleep indefinitely. This is a crock of the * first water, but until somebody wants to debug exactly what's * happening there, this is the best we can do. that doesn't seem related --- that's about missing FD_READ events not FD_WRITE. 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