diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-04 18:31:01 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-08-04 18:31:32 -0400 |
commit | 26d40ada3fa5d2671a16c34b2283448832630c86 (patch) | |
tree | 49053f3881228d2f02278ef74d8c1dc9d2ec54c6 /src/bin/pg_basebackup | |
parent | 620b49a16d2a16ce6f9edf072a88111f981919d0 (diff) | |
download | postgresql-26d40ada3fa5d2671a16c34b2283448832630c86.tar.gz postgresql-26d40ada3fa5d2671a16c34b2283448832630c86.zip |
Message style improvements
Diffstat (limited to 'src/bin/pg_basebackup')
-rw-r--r-- | src/bin/pg_basebackup/pg_receivewal.c | 2 | ||||
-rw-r--r-- | src/bin/pg_basebackup/receivelog.c | 6 | ||||
-rw-r--r-- | src/bin/pg_basebackup/walmethods.c | 20 |
3 files changed, 15 insertions, 13 deletions
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index f3c7668d50e..9ea61d5a5d4 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -280,7 +280,7 @@ FindStreamingStart(uint32 *tli) } if (lseek(fd, (off_t) (-4), SEEK_END) < 0) { - fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"), + fprintf(stderr, _("%s: could not seek in compressed file \"%s\": %s\n"), progname, fullpath, strerror(errno)); disconnect_and_exit(1); } diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index 15932c60b5a..888458f4a90 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -136,7 +136,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint) if (stream->walmethod->sync(f) != 0) { fprintf(stderr, - _("%s: could not sync existing write-ahead log file \"%s\": %s\n"), + _("%s: could not fsync existing write-ahead log file \"%s\": %s\n"), progname, fn, stream->walmethod->getlasterror()); stream->walmethod->close(f, CLOSE_UNLINK); return false; @@ -151,7 +151,9 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint) if (errno == 0) errno = ENOSPC; fprintf(stderr, - _("%s: write-ahead log file \"%s\" has %d bytes, should be 0 or %d\n"), + ngettext("%s: write-ahead log file \"%s\" has %d byte, should be 0 or %d\n", + "%s: write-ahead log file \"%s\" has %d bytes, should be 0 or %d\n", + size), progname, fn, (int) size, XLogSegSize); return false; } diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c index 2ab5ae93e09..02d368b2427 100644 --- a/src/bin/pg_basebackup/walmethods.c +++ b/src/bin/pg_basebackup/walmethods.c @@ -432,7 +432,7 @@ tar_write_compressed_data(void *buf, size_t count, bool flush) r = deflate(tar_data->zp, flush ? Z_FINISH : Z_NO_FLUSH); if (r == Z_STREAM_ERROR) { - tar_set_error("deflate failed"); + tar_set_error("could not compress data"); return false; } @@ -456,7 +456,7 @@ tar_write_compressed_data(void *buf, size_t count, bool flush) /* Reset the stream for writing */ if (deflateReset(tar_data->zp) != Z_OK) { - tar_set_error("deflateReset failed"); + tar_set_error("could not reset compression stream"); return false; } } @@ -557,7 +557,7 @@ tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_ { pg_free(tar_data->zp); tar_data->zp = NULL; - tar_set_error("deflateInit2 failed"); + tar_set_error("could not initialize compression library"); return NULL; } } @@ -569,7 +569,7 @@ tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_ Assert(tar_data->currentfile == NULL); if (tar_data->currentfile != NULL) { - tar_set_error("implementation error: tar files can't have more than one open file\n"); + tar_set_error("implementation error: tar files can't have more than one open file"); return NULL; } @@ -597,7 +597,7 @@ tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_ /* Turn off compression for header */ if (deflateParams(tar_data->zp, 0, 0) != Z_OK) { - tar_set_error("deflateParams failed"); + tar_set_error("could not change compression parameters"); return NULL; } } @@ -635,7 +635,7 @@ tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_ /* Re-enable compression for the rest of the file */ if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK) { - tar_set_error("deflateParams failed"); + tar_set_error("could not change compression parameters"); return NULL; } } @@ -824,7 +824,7 @@ tar_close(Walfile f, WalCloseMethod method) /* Turn off compression */ if (deflateParams(tar_data->zp, 0, 0) != Z_OK) { - tar_set_error("deflateParams failed"); + tar_set_error("could not change compression parameters"); return -1; } @@ -835,7 +835,7 @@ tar_close(Walfile f, WalCloseMethod method) /* Turn compression back on */ if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK) { - tar_set_error("deflateParams failed"); + tar_set_error("could not change compression parameters"); return -1; } } @@ -901,7 +901,7 @@ tar_finish(void) if (r == Z_STREAM_ERROR) { - tar_set_error("deflate failed"); + tar_set_error("could not compress data"); return false; } if (tar_data->zp->avail_out < ZLIB_OUT_SIZE) @@ -917,7 +917,7 @@ tar_finish(void) if (deflateEnd(tar_data->zp) != Z_OK) { - tar_set_error("deflateEnd failed"); + tar_set_error("could not close compression stream"); return false; } } |