Re: [HACKERS] pg_basebackup --progress output for batch execution

Поиск
Список
Период
Сортировка
От Martín Marqués
Тема Re: [HACKERS] pg_basebackup --progress output for batch execution
Дата
Msg-id 17c436fe-cd51-a52a-8fa4-ea24298ab59f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_basebackup --progress output for batch execution  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Ответы Re: [HACKERS] pg_basebackup --progress output for batch execution
Re: [HACKERS] pg_basebackup --progress output for batch execution
Список pgsql-hackers
El 21/11/17 a las 04:56, Arthur Zakirov escribió:
> On Mon, Nov 20, 2017 at 04:45:48PM -0300, Martín Marqués wrote:
>> New version of patch, without the --batch-mode option and using isatty()
>>
> 
> Great!
> 
>> +        fprintf(stderr, "waiting for checkpoint");
>> +        if (isatty(fileno(stderr)))
>> +            fprintf(stderr, "\n");
>> +        else
>> +            fprintf(stderr, "\r");
> 
> Here the condition should be inverted I think. The next condition should be used:
> 
>> if (!isatty(fileno(stderr)))
>> ...
> 
> Otherwise pg_basebackup will insert '\n' in terminal instead '\r'.

Ups! Attached the corrected version.:)

Nice catch. I completely missed that. Thanks.

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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rajkumar Raghuwanshi
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: [HACKERS] pg_basebackup --progress output for batch execution