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 1jtXmd-0004k0-9L for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 14:44:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtXmc-0007oJ-6W for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 14:44:18 +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 1jtXmb-0007oC-VS for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2020 14:44:17 +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 1jtXmZ-00040x-37 for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2020 14:44:16 +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 069EiAbL1818129; Thu, 9 Jul 2020 10:44:10 -0400 From: Tom Lane To: Andrew Dunstan cc: Thomas Kellerer , pgsql-hackers@lists.postgresql.org Subject: Re: Is this a bug in pg_current_logfile() on Windows? In-reply-to: References: <412ae8da-76bb-640f-039a-f3513499e53d@gmx.net> <1716646.1594226496@sss.pgh.pa.us> <1733826.1594243608@sss.pgh.pa.us> <252f062c-2b75-1bc3-e08a-3541719b27c0@2ndQuadrant.com> <1739104.1594250997@sss.pgh.pa.us> <1777519.1594262442@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Thu, 09 Jul 2020 09:43:53 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1818127.1594305850.1@sss.pgh.pa.us> Date: Thu, 09 Jul 2020 10:44:10 -0400 Message-ID: <1818128.1594305850@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: > On 7/8/20 10:40 PM, Tom Lane wrote: >> So I did that, and the first report is from bowerbird and it's still >> green. Unless I'm completely misinterpreting what's happening (always >> a possibility), that means we're still managing to remove "data" >> occurrences of \r. >> The most likely theory about that, I think, is that IPC::Run::run already >> translated any \r\n occurrences in the psql command's output to plain \n. >> Then, the \r generated by pg_current_logfile() would butt up against the >> line-ending \n, allowing the "fix" in sub psql to remove valid data. > It's possible. I do see some mangling of that kind in IPC::Run's > Win32IO.pm and Win32Pump.pm. The plot thickens: as of this morning, fairywren and jacana are showing the failure I expected, while drongo and bowerbird are not. (Our other Windows animals are not running the TAP tests, so they're no help here.) It's not hard to believe that the latter two are using a different libc implementation, but how would that affect the behavior of the TAP infrastructure? Are they also using different Perls? (By hypothesis, the pg_current_logfile bug exists across all Windows builds, so we have to explain why the TAP tests only reveal it on some of these animals.) regards, tom lane