Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyyvL-0001Gm-Si for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jan 2021 15:16:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kyyvK-0001F8-QJ for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jan 2021 15:16:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyyvK-0001EU-Iw for pgsql-hackers@lists.postgresql.org; Mon, 11 Jan 2021 15:16:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyyvE-0006Sc-D1 for pgsql-hackers@postgresql.org; Mon, 11 Jan 2021 15:16:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10BFFqx0864105; Mon, 11 Jan 2021 10:15:52 -0500 From: Tom Lane To: Hubert Zhang cc: "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" Subject: Re: Multiple hosts in connection string failed to failover in non-hot standby mode In-reply-to: References: , <229507.1610056206@sss.pgh.pa.us> <770711.1610318330@sss.pgh.pa.us>,<810463.1610333794@sss.pgh.pa.us> Comments: In-reply-to Hubert Zhang message dated "Mon, 11 Jan 2021 14:31:40 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <864103.1610378152.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 11 Jan 2021 10:15:52 -0500 Message-ID: <864104.1610378152@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hubert Zhang writes: > As for patch 0004, find ':' after "could not connect to" may failed when= error message like: > "could not connect to host "localhost" (::1), port 12345: Connection ref= used", where p2 will point to "::1" instead of ": Connection refused". But= since it's only used for test case, we don't need to filter the error mes= sage precisely. Excellent point, and I think that could happen on a Windows installation. We can make it look for ": " instead of just ':', and that'll reduce the odds of trouble. regards, tom lane