diff options
Diffstat (limited to 'src/bin/pg_basebackup/receivelog.c')
-rw-r--r-- | src/bin/pg_basebackup/receivelog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index f4151351727..8511e57cf7d 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -132,8 +132,11 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint) } /* fsync file in case of a previous crash */ - if (!stream->walmethod->sync(f)) + if (stream->walmethod->sync(f) != 0) { + fprintf(stderr, + _("%s: could not sync existing transaction log file \"%s\": %s\n"), + progname, fn, stream->walmethod->getlasterror()); stream->walmethod->close(f, CLOSE_UNLINK); return false; } |