diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-15 20:25:37 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-08-15 20:25:37 -0400 |
commit | 514731af58765f62b23309805270a07eae86c2c0 (patch) | |
tree | ec376f2c1cd3dea59e1245933e3e343e6a02f294 /src | |
parent | 0659465caa042b958e544e8b1857d8d7de03a83f (diff) | |
download | postgresql-514731af58765f62b23309805270a07eae86c2c0.tar.gz postgresql-514731af58765f62b23309805270a07eae86c2c0.zip |
pg_receivewal: Improve verbose mode
Some informational messages showed up even if verbose mode was not
used. Move them to verbose mode.
Author: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/pg_receivewal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 9ea61d5a5d4..4a1a5658fb3 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -120,7 +120,7 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished) * slightly before the end of the WAL that we received on the previous * timeline, but it's close enough for reporting purposes. */ - if (prevtimeline != 0 && prevtimeline != timeline) + if (verbose && prevtimeline != 0 && prevtimeline != timeline) fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"), progname, timeline, (uint32) (prevpos >> 32), (uint32) prevpos); @@ -130,8 +130,9 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished) if (time_to_abort) { - fprintf(stderr, _("%s: received interrupt signal, exiting\n"), - progname); + if (verbose) + fprintf(stderr, _("%s: received interrupt signal, exiting\n"), + progname); return true; } return false; |