Re: [HACKERS] pg_basebackup --progress output for batch execution - Mailing list pgsql-hackers

From Martín Marqués
Subject Re: [HACKERS] pg_basebackup --progress output for batch execution
Date
Msg-id f0c914f8-ffc4-7153-cbc1-9b0507d56b6b@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] pg_basebackup --progress output for batch execution  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
List pgsql-hackers
El 14/11/17 a las 06:25, Arthur Zakirov escribió:
> On Fri, Nov 10, 2017 at 10:32:23AM -0300, Martín Marqués wrote:
>> An example where using isatty() might fail is if you run pg_basebackup
>> from a tty but redirect the output to a file, I believe that in that
>> case isatty() will return true, but it's very likely that the user
>> might want batch mode output.
> 
> Sorry if I misunderstood you. I think this can happen if you redirect only standard output (stdout) to a file.

Don't be sorry. It was me who misunderstood how isatty() worked. Shame
on me. :(

I will iterate again with a new patch which has your ideas from before.

P.D.: But I'm going to first open a new thread on WIN32 compatibility of
isatty()

-- 
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] CLUSTER command progress monitor
Next
From: Fujii Masao
Date:
Subject: Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.