Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnwoX-0003B9-1r for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 00:29:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cnwoV-0008Ru-FE for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 00:29:15 +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 1cnwoU-0008RU-5K for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 00:29:14 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cnwoM-0008PJ-Vq for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 00:29:12 +0000 Received: by mail-qk0-x235.google.com with SMTP id 1so1692394qkl.3 for ; Tue, 14 Mar 2017 17:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=AqB5w+SJtBqsQka+l+kMf3VU73sFWJfLFA1XY/l8tVA=; b=0m01clJU26Xyl07+bXRlvh1L2gvoLuuBhhqdZ/CvQ1wMIeq7o82Q7dWrTjpXZrpStu 99ahZ58iuAX2QF4PwCOiBCRzeQGiPzTz4iITmajRy9n9QJp9NkPth1C0CcA2JukJQp5Z Rm/J6snxzBBgtU8n10K1NFrCU3BQxhMNpJi+pd6p7MRQpecIo8a9R1dTMCn5bRD2cVTh DW4b6iDDbHzaX3fKCzSv3bbT8DJU7bG1/ci933EDb/Qm5IcInHARfevGZg0jLQfvXX1L MG5hQAs7YzVbKkDN6BwVf4alpAVPIYuk/nb0WehFySRJw/wQosbcXX4/kzsh/ZCSiGWT JDlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=AqB5w+SJtBqsQka+l+kMf3VU73sFWJfLFA1XY/l8tVA=; b=rMwByr44NYjravZz9QGMouKpsjrfmjvL/R9T/sr7X01tjSsi960jLwjxa10ye6+GKL SNAD8VwuPJZDlnxmJ7owzseUTV5tjsgTwEt2UVFMJDVOi8MG8Q/peZxava5QHZBHxVWn Lz/PeMao+21YQJF5eQsykOKnUnFXw4SQ2Yeh4SIZnozmN4Y+lgl004Dw1SAek1uF8Y0L W7Zt6yHbYEmQny+oVYYi36WK+p7Q30ro8OgTp3+hL8rDg5yO7KhEZR7SK3qqeOZx2LDD cG8PnXBTFSVDLh4ARjP3e2fLscoBjd/iMw93LdSMHMcv4B5ZlxKE+CHACnpzMBtmHmsF p8vw== X-Gm-Message-State: AFeK/H2TvILX2E57Fe/njFFb4oBaOAid0uG8dFTCMf8Yf4V6HSkUvJR/6ZPDXRt3IhXK2sxWIyhakAqVdkXl9WpavgBOy3SnYMJNm1BcMCde5oVC/PXsVUa68va7e7b+KoZ/k6uD7GfLUvgumegNwg0ypFpO+vqoMnUAHPDIeeqv9yQNE4etJBc3HRgzjSPVQLiwXLrtzFWBc4E= X-Received: by 10.55.12.67 with SMTP id 64mr371910qkm.291.1489537745987; Tue, 14 Mar 2017 17:29:05 -0700 (PDT) Received: from [192.168.10.146] ([98.122.164.227]) by smtp.gmail.com with ESMTPSA id 63sm190971qta.37.2017.03.14.17.29.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Mar 2017 17:29:05 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver To: Tom Lane , Peter Eisentraut References: <19403.1488586564@sss.pgh.pa.us> <34d98fbf-9195-04d2-b85a-634d6952ffdf@2ndquadrant.com> <19815.1488600693@sss.pgh.pa.us> Cc: pgsql-hackers@postgreSQL.org Message-ID: <091deea0-75f2-cfda-ee8c-424162852084@2ndQuadrant.com> Date: Tue, 14 Mar 2017 20:29:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <19815.1488600693@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) 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 03/03/2017 11:11 PM, Tom Lane wrote: > Peter Eisentraut writes: >> On 3/3/17 19:16, Tom Lane wrote: >>> Peter Eisentraut writes: >>>> Use asynchronous connect API in libpqwalreceiver >>> Buildfarm member bowerbird has been failing in the pg_rewind test since >>> this patch went in. It looks like it's failing to complete connections >>> from the standby; which suggests that something platform-specific is >>> missing from this commit, but I dunno what. >> Hmm, I wonder how widely tested the async connection API is on Windows >> at all. I only see bowerbird and jacana running bin-check on Windows. > Yeah, I was wondering if this is just exposing a pre-existing bug. > However, the "normal" path operates by repeatedly invoking PQconnectPoll > (cf. connectDBComplete) so it's not immediately obvious how such a bug > would've escaped detection. > >=20=09=09=09 (After a long period of fruitless empirical testing I turned to the code) Maybe I'm missing something, but connectDBComplete() handles a return of PGRESS_POLLING_OK as a success while connectDBStart() seems not to. I don't find anywhere in our code other than libpqwalreceiver that actually uses that interface, so it's not surprising if it's now failing. So my bet is it is indeed a long-standing bug. cheers andr4ew --=20 Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers