From 992cadba2ee51f34aee34de2dd1ac34483e2e24b Mon Sep 17 00:00:00 2001 From: xiepy Date: Wed, 7 Apr 2021 11:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AF=A5gs=5Fbasebackup=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=B6=88=E6=81=AF=E4=B8=8D=E6=B8=85=E6=99=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/pg_basebackup/receivelog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/pg_basebackup/receivelog.cpp b/src/bin/pg_basebackup/receivelog.cpp index 7f11d7146..5a18a3e32 100644 --- a/src/bin/pg_basebackup/receivelog.cpp +++ b/src/bin/pg_basebackup/receivelog.cpp @@ -283,17 +283,17 @@ static bool close_walfile(int walfile, const char* basedir, char* walname, bool off_t currpos = lseek(walfile, 0, SEEK_CUR); if (currpos == -1) { - pg_log(PG_PRINT, _("%s: could not get current position in file %s: %s\n"), progname, walname, strerror(errno)); + pg_log(PG_PRINT, _("%s: could not get current position in file \"%s/%s\": %s\n"), progname, basedir, walname, strerror(errno)); return false; } if (fsync(walfile) != 0) { - pg_log(PG_PRINT, _("%s: could not fsync file %s: %s\n"), progname, walname, strerror(errno)); + pg_log(PG_PRINT, _("%s: could not fsync file \"%s/%s\": %s\n"), progname, basedir, walname, strerror(errno)); return false; } if (close(walfile) != 0) { - pg_log(PG_PRINT, _("%s: could not close file %s: %s\n"), progname, walname, strerror(errno)); + pg_log(PG_PRINT, _("%s: could not close file \"%s/%s\": %s\n"), progname, basedir, walname, strerror(errno)); return false; } @@ -311,11 +311,11 @@ static bool close_walfile(int walfile, const char* basedir, char* walname, bool nRet = snprintf_s(newfn, sizeof(newfn), sizeof(newfn) - 1, "%s/%s", basedir, walname); securec_check_ss_c(nRet, "", ""); if (rename(oldfn, newfn) != 0) { - pg_log(PG_PRINT, _("%s: could not rename file %s: %s\n"), progname, walname, strerror(errno)); + pg_log(PG_PRINT, _("%s: could not rename file \"%s/%s\": %s\n"), progname, basedir, walname, strerror(errno)); return false; } } else { - pg_log(PG_PRINT, _("%s: not renaming %s, segment is not complete.\n"), progname, walname); + pg_log(PG_PRINT, _("%s: not renaming \"%s/%s\", segment is not complete.\n"), progname, basedir, walname); } lastFlushPosition = pos;