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 1nZKQ4-0006To-Ro for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 22:34:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZKQ2-0002Iv-M1 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 22:34:30 +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 1nZKQ2-0002Il-Cp for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 22:34:30 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZKPx-0001F2-3T for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 22:34:29 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id B3258240003; Tue, 29 Mar 2022 22:34:19 +0000 (UTC) Message-ID: <04e52bc8-1fa6-49c6-738e-c3b3f7b9e360@dunslane.net> Date: Tue, 29 Mar 2022 18:34:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module. Content-Language: en-US To: Robert Haas , Thomas Munro Cc: Andres Freund , PostgreSQL Hackers , Magnus Hagander References: <20220315190428.2xf6klawmaq4nuyy@alap3.anarazel.de> <626827E9-4A50-493D-A8EE-EB3C238BB47F@anarazel.de> From: Andrew Dunstan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/29/22 17:19, Robert Haas wrote: > On Tue, Mar 29, 2022 at 4:36 PM Thomas Munro wrote: >> It failed: >> >> https://cirrus-ci.com/task/5567070686412800 >> https://api.cirrus-ci.com/v1/artifact/task/5567070686412800/log/contrib/basebackup_to_shell/tmp_check/log/001_basic_primary.log >> https://api.cirrus-ci.com/v1/artifact/task/5567070686412800/log/contrib/basebackup_to_shell/tmp_check/log/regress_log_001_basic > Hmm. The log here is not very informative. It just says that the first > time we tried to use the 'shell' target, it timed out. I suppose the > most obvious explanation for that is that the shell command we > executed timed out: > > qq{type con > "$escaped_backup_path\\\\%f"} > > But why should that be so? Does 'type con' not respond to EOF? I don't > see how that can be the case. Is our implementation of pclose broken? > If so, then I think COPY TO/FROM PROGRAM would be broken on Windows. > AIUI 'type con' is not the equivalent of Unix cat, especially w.r.t. stdin. It's going to try to read from the console, not from stdin. It's more the equivalent of 'cat /dev/tty'. So it's not at all surprising that it hangs. I don't know of a Windows builtin that is equivalent to cat. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com