Newline after --progress report

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Newline after --progress report
Дата
Msg-id 82b539e5-ae33-34b0-1aee-22b3379fd3eb@iki.fi
обсуждение исходный текст
Ответы Re: Newline after --progress report  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
While hacking on pg_rewind, this in pg_rewind's main() function caught 
my eye:

     progress_report(true);
     printf("\n");

It is peculiar, because progress_report() uses fprintf(stderr, ...) for 
all its printing, and in fact the only other use of printf() in 
pg_rewind is in printing the "pg_rewind --help" text.

I think the idea here was to move to the next line, after 
progress_report() has updated the progress line for the last time. It 
probably also should not be printed, when "--progress" is not used.

Attached is a patch to fix this, as well as a similar issue in 
pg_checksums. pg_basebackup and pgbench also print progres reports like 
this, but they seem correct to me.

- Heikki

Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: massive FPI_FOR_HINT load after promote
Следующее
От: Li Japin
Дата:
Сообщение: Re: Terminate the idle sessions