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 1lHWdp-0006KE-UI for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Mar 2021 18:54:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHWdo-0003xf-QW for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Mar 2021 18:54:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHWdo-0003xY-K9 for pgsql-hackers@lists.postgresql.org; Wed, 03 Mar 2021 18:54:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHWdm-0001NS-OH for pgsql-hackers@postgresql.org; Wed, 03 Mar 2021 18:54:36 +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 123IsIuv1205271; Wed, 3 Mar 2021 13:54:18 -0500 From: Tom Lane To: vignesh C cc: Greg Nancarrow , Alvaro Herrera , Anastasia Lubennikova , Peter Smith , "Smith, Peter" , David Steele , "Tsunakawa, Takayuki" , Haribabu Kommi , Robert Haas , Laurenz Albe , Dave Cramer , Jing Wang , PostgreSQL-development , Elvis Pranskevichus Subject: Re: Libpq support to connect to standby server as priority In-reply-to: <1149041.1614746350@sss.pgh.pa.us> References: <20201124225917.GA21884@alvherre.pgsql> <325979.1606259987@sss.pgh.pa.us> <388250.1606266434@sss.pgh.pa.us> <493358.1606322607@sss.pgh.pa.us> <3425296.1609882492@sss.pgh.pa.us> <1127614.1614737237@sss.pgh.pa.us> <1149041.1614746350@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 02 Mar 2021 23:39:10 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1205269.1614797657.1@sss.pgh.pa.us> Date: Wed, 03 Mar 2021 13:54:18 -0500 Message-ID: <1205270.1614797658@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > vignesh C writes: >> Conchuela is failing because of: >> ok 17 - connect to node standby_1 if mode "standby" and standby_1,primary >> listed >> ack Broken pipe: write( 13, 'SHOW port;' ) at >> /usr/local/lib/perl5/site_perl/IPC/Run/IO.pm line 549. > It didn't fail on the next run, so this might just be a phase-of-the-moon > glitch. Conchuela is a bit prone to that sort of thing, in my experience. > We'll have to wait and see if it's at all repeatable. Conchuela hasn't shown it again, but it turns out to be repeatable on my old warhorse gaur. After a bit of study I see the problem: we're asking Perl to write to the stdin of a psql process that may not be there to receive the data. We've dodged that issue in other tests by passing "undef" as the stdin to sub psql, so that's what I did here. regards, tom lane