1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Update warning for backup resume invalid repo file.

This warning has had a note since the C migration that it should be moved below the backup file log message, so do that.

Also update the warning message a bit to correct for tense. This message was likely in a different place originally.
This commit is contained in:
David Steele
2023-12-21 15:28:37 -03:00
parent 701865eca1
commit 3cd8249dba
2 changed files with 13 additions and 15 deletions

View File

@@ -1480,25 +1480,23 @@ backupJobResult(
// Else file was copied so update manifest
else
{
// If the file had to be recopied then warn that there may be an issue with corruption in the repository
// ??? This should really be below the message below for more context -- can be moved after the migration
// ??? The name should be a pg path not manifest name -- can be fixed after the migration
LOG_DETAIL_PID_FMT(
processId, "%s file %s (%s)%s", copyResult != backupCopyResultTruncate ? "backup" : "store truncated",
strZ(fileLog), strZ(logProgress), strZ(logChecksum));
// If the repo file was invalid warn that there might be corruption in the repository
if (repoInvalid)
{
ASSERT(copyResult == backupCopyResultCopy);
LOG_WARN_FMT(
"resumed backup file %s does not have expected checksum %s. The file will be recopied and backup will"
"resumed backup file %s did not have expected checksum %s. The file was recopied and backup will"
" continue but this may be an issue unless the resumed backup path in the repository is known to be"
" corrupted.\n"
"NOTE: this does not indicate a problem with the PostgreSQL page checksums.",
strZ(file.name), strZ(strNewEncode(encodingHex, BUF(file.checksumSha1, HASH_TYPE_SHA1_SIZE))));
}
LOG_DETAIL_PID_FMT(
processId, "%s file %s (%s)%s", copyResult != backupCopyResultTruncate ? "backup" : "store truncated",
strZ(fileLog), strZ(logProgress), strZ(logChecksum));
// If the file had page checksums calculated during the copy
ASSERT((!file.checksumPage && checksumPageResult == NULL) || (file.checksumPage && checksumPageResult != NULL));

View File

@@ -2528,16 +2528,16 @@ testRun(void)
" from resumed backup (reference in resumed manifest)\n"
"P01 DETAIL: backup file " TEST_PATH "/pg1/global/pg_control (8KB, [PCT]) checksum [SHA1]\n"
"P01 DETAIL: match file from prior backup " TEST_PATH "/pg1/postgresql.conf (11B, [PCT]) checksum [SHA1]\n"
"P00 WARN: resumed backup file pg_data/time-mismatch2 does not have expected checksum"
" 984816fd329622876e14907634264e6f332e9fb3. The file will be recopied and backup will continue but this may be"
" an issue unless the resumed backup path in the repository is known to be corrupted.\n"
" NOTE: this does not indicate a problem with the PostgreSQL page checksums.\n"
"P01 DETAIL: backup file " TEST_PATH "/pg1/time-mismatch2 (4B, [PCT]) checksum [SHA1]\n"
"P00 WARN: resumed backup file pg_data/repo-size-mismatch does not have expected checksum"
" 984816fd329622876e14907634264e6f332e9fb3. The file will be recopied and backup will continue but this may be"
" an issue unless the resumed backup path in the repository is known to be corrupted.\n"
"P00 WARN: resumed backup file pg_data/time-mismatch2 did not have expected checksum"
" 984816fd329622876e14907634264e6f332e9fb3. The file was recopied and backup will continue but this may be an issue"
" unless the resumed backup path in the repository is known to be corrupted.\n"
" NOTE: this does not indicate a problem with the PostgreSQL page checksums.\n"
"P01 DETAIL: backup file " TEST_PATH "/pg1/repo-size-mismatch (4B, [PCT]) checksum [SHA1]\n"
"P00 WARN: resumed backup file pg_data/repo-size-mismatch did not have expected checksum"
" 984816fd329622876e14907634264e6f332e9fb3. The file was recopied and backup will continue but this may be an issue"
" unless the resumed backup path in the repository is known to be corrupted.\n"
" NOTE: this does not indicate a problem with the PostgreSQL page checksums.\n"
"P01 DETAIL: skip file removed by database " TEST_PATH "/pg1/removed-during\n"
"P01 DETAIL: backup file " TEST_PATH "/pg1/content-mismatch (4B, [PCT]) checksum [SHA1]\n"
"P01 DETAIL: match file from prior backup " TEST_PATH "/pg1/PG_VERSION (3B, [PCT]) checksum [SHA1]\n"