diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-08-17 09:27:29 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-08-17 09:33:10 +0300 |
commit | 9f44d71b06b0d457ad3e5d7fdcbba2039f3000ef (patch) | |
tree | 88c7b2ca2f7c91289ed0d0ff66dc48b22df76ff4 /src/backend/parser/parse_utilcmd.c | |
parent | 29bd2cbe36bd3549a6a81df6e5dab172f43ef033 (diff) | |
download | postgresql-9f44d71b06b0d457ad3e5d7fdcbba2039f3000ef.tar.gz postgresql-9f44d71b06b0d457ad3e5d7fdcbba2039f3000ef.zip |
Fix printing last progress report line in client programs.
A number of client programs have a "--progress" option that when printing
to a TTY, updates the current line by printing a '\r' and overwriting it.
After the last line, '\n' needs to be printed to move the cursor to the
next line. pg_basebackup and pgbench got this right, but pg_rewind and
pg_checksums were slightly wrong. pg_rewind printed the newline to stdout
instead of stderr, and pg_checksums printed the newline even when not
printing to a TTY. Fix them, and also add a 'finished' argument to
pg_basebackup's progress_report() function, to keep it consistent with
the other programs.
Backpatch to v12. pg_rewind's newline was broken with the logging changes
in commit cc8d415117 in v12, and pg_checksums was introduced in v12.
Discussion: https://www.postgresql.org/message-id/82b539e5-ae33-34b0-1aee-22b3379fd3eb@iki.fi
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions