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

From Arthur Zakirov
Subject Re: [HACKERS] pg_basebackup --progress output for batch execution
Date
Msg-id 20171110092429.GA5549@zakirov.localdomain
Whole thread Raw
In response to Re: [HACKERS] pg_basebackup --progress output for batch execution  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
On Thu, Nov 09, 2017 at 03:55:36PM -0800, Jeff Janes wrote:
> 
> I think I agree with Arthur that I'd rather have the decision made by
> inspecting whether output is going to a tty, rather than by adding another
> command line option.  But maybe that is not detected robustly enough across
> all platforms and circumstances?
> 

isatty() is used within Postgres code already (for example, pg_upgrade/util.c).
However, it seems that on Windows isatty() is deprecated and it is recommended to use _isatty(). Moreover, on Windows
itcan give false positive result [1], if I'm not mistaken:
 

> The _isatty function determines whether fd is associated with a character device (a terminal, console, printer, or
serialport).
 

1 - https://msdn.microsoft.com/en-us/library/f4s0ddew(v=vs.140).aspx

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Aggregates push-down to partitions
Next
From: Etsuro Fujita
Date:
Subject: [HACKERS] Incorrect comment for build_child_join_rel