Re: [HACKERS] pg_basebackup --progress output for batch execution
От | Martín Marqués |
---|---|
Тема | Re: [HACKERS] pg_basebackup --progress output for batch execution |
Дата | |
Msg-id | 284aea2f-aebb-aa22-ddb4-f7e0a4fe0575@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
|
Список | pgsql-hackers |
El 09/11/17 a las 09:29, Arthur Zakirov escribió: > Hello, > > On Sun, Oct 01, 2017 at 04:49:17PM -0300, Martin Marques wrote: >> Updated patch with documentation of the new option. >> > > I have checked the patch. > The patch is applied and compiled correctly without any errors. Tests passed. > The documentation doesn't have errors too. > > > I have a little suggestion. Maybe insert new line without any additional parameters? We can check that stderr is not terminalusing isatty(). > > The code could become: > > if (!isatty(fileno(stderr))) > fprintf(stderr, "\n"); > else > fprintf(stderr, "\r"); > > Also it could be good to not insert new line after progress: > > if (showprogress) > { > progress_report(PQntuples(res), NULL, true); > /* if (!batchmode) */ > /* or */ > if (isatty(fileno(stderr))) > fprintf(stderr, "\n"); /* Need to move to next line */ > } New version of patch, without the --batch-mode option and using isatty() I send in a separate thread a proposal to make isatty() be defined as _isatty() in windows. -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: