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

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [HACKERS] pg_basebackup --progress output for batch execution
Дата
Msg-id CAMkU=1z=nSWx4P=p=YOOEe9EPmQeNkUOANFY+3LRYQcsr91W2Q@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] pg_basebackup --progress output for batch execution  (Martin Marques <martin.marques@2ndquadrant.com>)
Ответы Re: [HACKERS] pg_basebackup --progress output for batch execution
Re: [HACKERS] pg_basebackup --progress output for batch execution
Список pgsql-hackers
On Fri, Sep 29, 2017 at 4:00 PM, Martin Marques <martin.marques@2ndquadrant.com> wrote:
Hi,

Some time ago I had to work on a system where I was cloning a standby
using pg_basebackup, that didn't have screen or tmux. For that reason I
redirected the output to a file and ran it with nohup.

I normally (always actually ;) ) run pg_basebackup with --progress and
--verbose so I can follow how much has been done. When done on a tty you
get a nice progress bar with the percentage that has been cloned.

The problem came with the execution and redirection of the output, as
the --progress option will write a *very* long line!

Back then I thought of writing a patch (actually someone suggested I do
so) to add a --batch-mode option which would change the behavior
pg_basebackup has when printing the output messages.


While separate lines in the output file is better than one very long line, it still doesn't seem so useful.  If you aren't watching it in real time, then you really need to have a timestamp on each line so that you can interpret the output.  The lines are about one second apart, but I don't know robust that timing is under all conditions.

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?

Cheers,

Jeff

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: [HACKERS] libpq connection strings: control over the ciphersuites?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Simplify ACL handling for large objects and removal ofsuperuser() checks