Commit 514731af authored by Peter Eisentraut's avatar Peter Eisentraut

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: default avatarDaniel Gustafsson <daniel@yesql.se>
parent 0659465c
...@@ -120,7 +120,7 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished) ...@@ -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 * slightly before the end of the WAL that we received on the previous
* timeline, but it's close enough for reporting purposes. * 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"), fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
progname, timeline, progname, timeline,
(uint32) (prevpos >> 32), (uint32) prevpos); (uint32) (prevpos >> 32), (uint32) prevpos);
...@@ -130,8 +130,9 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished) ...@@ -130,8 +130,9 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
if (time_to_abort) if (time_to_abort)
{ {
fprintf(stderr, _("%s: received interrupt signal, exiting\n"), if (verbose)
progname); fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
progname);
return true; return true;
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment