Use carriage returns for data insertion logs in pgbench on terminal
authorMichael Paquier <michael@paquier.xyz>
Wed, 4 Dec 2019 02:33:14 +0000 (11:33 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 4 Dec 2019 02:33:14 +0000 (11:33 +0900)
commitd37ddb745be07502814635585cbf935363c8a33d
tree2bbc49bc277279019958f0a7c61101b1d5e51a2c
parent85b9ef5fe7533e5d07dcf2a2b67c8855a34e5125
Use carriage returns for data insertion logs in pgbench on terminal

This is similar to what pg_basebackup and pg_rewind do when reporting
cumulative data, and that's more user-friendly.  Carriage returns are
now used when stderr points to a terminal, and newlines are used in
other cases, like a redirection to a log file.

Author: Amit Langote
Reviewed-by: Fabien Coelho
Discussion: https://postgr.es/m/CA+HiwqFNwEjPeVaQsp2L7DyCPv1Eg1guwhrVhzMYqUJUk8ULKg@mail.gmail.com
src/bin/pgbench/pgbench.c