Skip to content

Commit 514731a

Browse files
committed
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 <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]>
1 parent 0659465 commit 514731a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/pg_basebackup/pg_receivewal.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
120120
* slightly before the end of the WAL that we received on the previous
121121
* timeline, but it's close enough for reporting purposes.
122122
*/
123-
if (prevtimeline != 0 && prevtimeline != timeline)
123+
if (verbose && prevtimeline != 0 && prevtimeline != timeline)
124124
fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
125125
progname, timeline,
126126
(uint32) (prevpos >> 32), (uint32) prevpos);
@@ -130,8 +130,9 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
130130

131131
if (time_to_abort)
132132
{
133-
fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
134-
progname);
133+
if (verbose)
134+
fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
135+
progname);
135136
return true;
136137
}
137138
return false;

0 commit comments

Comments
 (0)