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 1mRJNq-0003zU-I1 for pgsql-committers@arkaria.postgresql.org; Fri, 17 Sep 2021 19:18:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mRJNp-00075O-HO for pgsql-committers@arkaria.postgresql.org; Fri, 17 Sep 2021 19:18:49 +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 1mRJNp-00075F-Bi for pgsql-committers@lists.postgresql.org; Fri, 17 Sep 2021 19:18:49 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRJNl-00011R-S6 for pgsql-committers@lists.postgresql.org; Fri, 17 Sep 2021 19:18:47 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 5686EC0004; Fri, 17 Sep 2021 19:18:40 +0000 (UTC) Subject: Re: pgsql: Support "postgres -C" with runtime-computed GUCs To: Michael Paquier , Tom Lane Cc: pgsql-committers@lists.postgresql.org References: <1252480.1631829409@sss.pgh.pa.us> From: Andrew Dunstan Message-ID: <22a1c05f-a931-ba46-fb88-ac9680e7816a@dunslane.net> Date: Fri, 17 Sep 2021 15:18:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/16/21 8:44 PM, Michael Paquier wrote: > On Fri, Sep 17, 2021 at 08:08:44AM +0900, Michael Paquier wrote: >> I am not completely sure what's going on here yet, so I'll just switch >> the test to be skipped when Msys is involved for now. That should be >> enough to bring back those machines to green. > So, after drinking down a coffee, I have remembered the difference > between the Msys and native perls when it comes to IPC::Run: > - Msys perl generates \r\n. > - Native perl generates \n. > > We have already a couple of places where we filter that out, like > PostgresNode::psql or slurp_file. But we are missing some spots > before calling like() for outputs generated by IPC::Run. I have > tracked all those places with the attached, and I think that this > should take care of the failure seen here while preventing future > problems. > > Any thoughts? The fixups for command_checks_all should go before the loops, not inside them. I would probably add a single line like this just after the call that checks the status:    foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; } although maybe perltidy would reformat that. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com