pgbackrest.git / summary / log / commit / refs

commit    db17973cd0a8a5692e408621703fd83fbce40166
Author:   David Steele <david@pgmasters.net>
Date:     Tue Jul 03 18:01:57 2018 +0000

    Fix critical bug in resume that resulted in inconsistent backups.
    
    A regression in v0.82 removed the timestamp comparison when deciding which files from the aborted backup to keep on resume. All resumed backups should be considered inconsistent. A resumed backup can be identified by checking the log for the message "aborted backup of same type exists, will be cleaned to remove invalid files and resumed".
    
    Reported by David Youatt, Yogesh Sharma, Stephen Frost.


doc/xml/release.xml | 10 +++++ lib/pgBackRest/Backup/Backup.pm | 6 ++- lib/pgBackRest/Backup/File.pm | 7 ++-- src/perl/embed.auto.c | 13 ++++-- test/expect/mock-all-001.log | 48 ++++++++++++++-------- test/expect/mock-all-002.log | 46 ++++++++++++++------- test/expect/mock-all-003.log | 8 +++- test/lib/pgBackRestTest/Module/Mock/MockAllTest.pm | 39 ++++++++++++++---- 8 files changed, 129 insertions(+), 48 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index b46bfd6fd..fd1480040 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -15,6 +15,16 @@ <release date="XXXX-XX-XX" version="2.04dev" title="UNDER DEVELOPMENT"> <release-core-list> <release-bug-list> + <release-item> + <release-item-contributor-list> + <release-item-ideator id="youatt.david"/> + <release-item-ideator id="sharma.yogesh"/> + <release-item-ideator id="frost.stephen"/> + </release-item-contributor-list> + + <p>Fix critical bug in resume that resulted in inconsistent backups. A regression in <id>v0.82</id> removed the timestamp comparison when deciding which files from the aborted backup to keep on resume. All resumed backups should be considered inconsistent. A resumed backup can be identified by checking the log for the message <quote>aborted backup of same type exists, will be cleaned to remove invalid files and resumed</quote>.</p> + </release-item> + <release-item> <release-item-contributor-list> <release-item-ideator id="nj.baliyan"/> diff --git a/lib/pgBackRest/Backup/Backup.pm b/lib/pgBackRest/Backup/Backup.pm index 3b2c95634..71893ada1 100644 --- a/lib/pgBackRest/Backup/Backup.pm +++ b/lib/pgBackRest/Backup/Backup.pm @@ -132,7 +132,11 @@ sub resumeClean # To be preserved the checksum must be defined my $strChecksum = $oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_CHECKSUM, false); - if (defined($strChecksum)) + if (defined($strChecksum) && + $oManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_TIMESTAMP) == + $oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_TIMESTAMP) && + $oManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_SIZE) == + $oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_SIZE)) { $oManifest->set(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_CHECKSUM, $strChecksum); diff --git a/lib/pgBackRest/Backup/File.pm b/lib/pgBackRest/Backup/File.pm index 3cd1f1afb..da912a7c4 100644 --- a/lib/pgBackRest/Backup/File.pm +++ b/lib/pgBackRest/Backup/File.pm @@ -246,9 +246,10 @@ sub backupManifestUpdate { &log( WARN, - "resumed backup file ${strRepoFile} should have checksum ${strChecksum} but actually has checksum ${strChecksumCopy}." . - " The file will be recopied and backup will continue but this may be an issue unless the backup temp path is known to" . - " be corrupted."); + "resumed backup file ${strRepoFile} does not have expected checksum ${strChecksum}. 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."); } # If copy was successful store the checksum and size diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c index b314c3e2e..c12418a53 100644 --- a/src/perl/embed.auto.c +++ b/src/perl/embed.auto.c @@ -2502,7 +2502,11 @@ static const EmbeddedModule embeddedModule[] = "\n" "my $strChecksum = $oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_CHECKSUM, false);\n" "\n" - "if (defined($strChecksum))\n" + "if (defined($strChecksum) &&\n" + "$oManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_TIMESTAMP) ==\n" + "$oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_TIMESTAMP) &&\n" + "$oManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_SIZE) ==\n" + "$oAbortedManifest->get(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_SIZE))\n" "{\n" "$oManifest->set(MANIFEST_SECTION_TARGET_FILE, $strFile, MANIFEST_SUBKEY_CHECKSUM, $strChecksum);\n" "\n" @@ -3881,9 +3885,10 @@ static const EmbeddedModule embeddedModule[] = "{\n" "&log(\n" "WARN,\n" - "\"resumed backup file ${strRepoFile} should have checksum ${strChecksum} but actually has checksum ${strChecksumCopy}.\" .\n" - "\" The file will be recopied and backup will continue but this may be an issue unless the backup temp path is known to\" .\n" - "\" be corrupted.\");\n" + "\"resumed backup file ${strRepoFile} does not have expected checksum ${strChecksum}. The file will be recopied and\" .\n" + "\" backup will continue but this may be an issue unless the resumed backup path in the repository is known to be\" .\n" + "\" corrupted.\\n\" .\n" + "\"NOTE: this does not indicate a problem with the PostgreSQL page checksums.\");\n" "}\n" "\n" "\n" diff --git a/test/expect/mock-all-001.log b/test/expect/mock-all-001.log index 19f4da879..ecb12d8bf 100644 --- a/test/expect/mock-all-001.log +++ b/test/expect/mock-all-001.log @@ -1923,8 +1923,9 @@ P00 DEBUG: Backup::Backup->processManifest: reference pg_data/global/pg_con P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/12000 to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/postgresql.conf to [BACKUP-FULL-2] P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/badchecksum.txt, pg_data/badchecksum.txt, 11, [undef], 0, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/badchecksum.txt, strOp = backupFile, strQueue = pg_data -P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-2], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 P00 DEBUG: Backup::Backup->processManifest: reference pg_data/pg_stat/global.stat to [BACKUP-FULL-2] +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/changesize.txt, pg_data/changesize.txt, 4, [undef], 0, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/changesize.txt, strOp = backupFile, strQueue = pg_data P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/32768/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/16384/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/PG_VERSION to [BACKUP-FULL-2] @@ -1937,16 +1938,19 @@ P00 DEBUG: Protocol::Local::Process->init: init local process: iDirection = P00 DEBUG: Protocol::Local::Process->init=>: bResult = true P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/badchecksum.txt, strQueueIdx = 0 P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 11, 11, f927212cd08d11a42a666b2f04235398e9ceeb51, [undef]), strKey = pg_data/badchecksum.txt +P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/changesize.txt, strQueueIdx = 0 +P01 INFO: backup file [TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 50%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 4, 4, 88087292ed82e26f3eb824d0bffc05ccf7a30f8d, [undef]), strKey = pg_data/changesize.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strQueueIdx = 1 -P01 INFO: backup file [TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 61%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 -P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P01 INFO: backup file [TEST_PATH]/db-master/db/base/changesize.txt (4B, 68%) checksum 88087292ed82e26f3eb824d0bffc05ccf7a30f8d +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, 14c44cef6287269b08d41de489fd492bb9fc795d, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt P00 DEBUG: Protocol::Local::Process->process: no jobs found, stop local: iHostConfigIdx = [undef], iHostIdx = 0, iProcessId = 1, strHostType = [undef] P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum 14c44cef6287269b08d41de489fd492bb9fc795d P00 WARN: page misalignment in file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt: file size 7 is not divisible by page size 8192 P00 DEBUG: Protocol::Local::Process->process: all jobs complete -P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 18 -P00 INFO: incr backup size = 18B +P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 22 +P00 INFO: incr backup size = 22B P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 P00 DEBUG: Storage::Local->pathSync(): strPathExp = <REPO:BACKUP>/[BACKUP-INCR-1] @@ -2135,10 +2139,11 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"88087292ed82e26f3eb824d0bffc05ccf7a30f8d","master":true,"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} -pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"d85de07d6421d90aa9191c11c889bfde43680f0f","checksum-page":false,"size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"14c44cef6287269b08d41de489fd492bb9fc795d","checksum-page":false,"size":[SIZE],"timestamp":[TIMESTAMP-2]} [target:file:default] group="[GROUP-1]" @@ -2313,6 +2318,10 @@ P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt P00 DEBUG: Backup::Backup->resumeClean(): oAbortedManifest = [object], oManifest = [object], oStorageRepo = [object], strBackupLabel = [BACKUP-INCR-2] P00 DETAIL: clean resumed backup path: [TEST_PATH]/db-master/repo/backup/db/[BACKUP-INCR-2] P00 DEBUG: Storage::Local->manifest(): strPathExp = <REPO:BACKUP>/[BACKUP-INCR-2] +P00 DEBUG: Backup::Backup->resumeClean: remove file pg_data/changesize.txt +P00 DEBUG: Backup::Backup->resumeClean: remove file pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P00 DEBUG: Storage::Local->remove(): bIgnoreMissing = <true>, bRecurse = <false>, xstryPathFileExp = (<REPO:BACKUP>/[BACKUP-INCR-2]/pg_data/changesize.txt, <REPO:BACKUP>/[BACKUP-INCR-2]/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt) +P00 DEBUG: Storage::Local->remove=>: bRemoved = true P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/repo/backup/db/[BACKUP-INCR-2]/backup.manifest P00 DEBUG: Storage::Local->exists=>: bExists = false P00 DEBUG: Storage::Local->openWrite(): bAtomic = <false>, bPathCreate = <false>, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/repo/backup/db/[BACKUP-INCR-2]/backup.manifest.copy @@ -2326,9 +2335,10 @@ P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/16384/17 P00 DEBUG: Backup::Backup->processManifest: reference pg_data/global/pg_control to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/12000 to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/postgresql.conf to [BACKUP-FULL-2] -P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/badchecksum.txt, pg_data/badchecksum.txt, 11, bogus, 0, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/badchecksum.txt, strOp = backupFile, strQueue = pg_data +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/badchecksum.txt, pg_data/badchecksum.txt, 11, f927212cd08d11a42a666b2f04235398e9ceeb51, 0, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/badchecksum.txt, strOp = backupFile, strQueue = pg_data +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/changesize.txt, pg_data/changesize.txt, 9, [undef], 0, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/changesize.txt, strOp = backupFile, strQueue = pg_data P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, 7, [undef], 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, strOp = backupFile, strQueue = pg_tblspc/2 -P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 P00 DEBUG: Backup::Backup->processManifest: reference pg_data/pg_stat/global.stat to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/32768/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/16384/PG_VERSION to [BACKUP-FULL-2] @@ -2342,20 +2352,25 @@ P00 DEBUG: Protocol::Local::Process->init: init local process: iDirection = P00 DEBUG: Protocol::Local::Process->init=>: bResult = true P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/badchecksum.txt, strQueueIdx = 0 P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (2, 11, 11, f927212cd08d11a42a666b2f04235398e9ceeb51, [undef]), strKey = pg_data/badchecksum.txt +P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/changesize.txt, strQueueIdx = 0 +P00 WARN: resumed backup file pg_data/badchecksum.txt does not have expected checksum f927212cd08d11a42a666b2f04235398e9ceeb51. 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. + NOTE: this does not indicate a problem with the PostgreSQL page checksums. +P01 INFO: backup file [TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 32%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 9, 9, 3905d5be2ec8d67f41435dab5e0dcda3ae47455d, [undef]), strKey = pg_data/changesize.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, strQueueIdx = 1 -P00 WARN: resumed backup file pg_data/badchecksum.txt should have checksum bogus but actually has checksum f927212cd08d11a42a666b2f04235398e9ceeb51. The file will be recopied and backup will continue but this may be an issue unless the backup temp path is known to be corrupted. -P01 INFO: backup file [TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P01 INFO: backup file [TEST_PATH]/db-master/db/base/changesize.txt (9B, 58%) checksum 3905d5be2ec8d67f41435dab5e0dcda3ae47455d P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, dc7f76e43c46101b47acc55ae4d593a9e6983578, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strQueueIdx = 2 -P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 72%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 +P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 79%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 P00 WARN: page misalignment in file [TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt: file size 7 is not divisible by page size 8192 -P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (0, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, [undef]), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt P00 DEBUG: Protocol::Local::Process->process: no jobs found, stop local: iHostConfigIdx = [undef], iHostIdx = 0, iProcessId = 1, strHostType = [undef] P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P01 DETAIL: checksum resumed file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P00 WARN: page misalignment in file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt: file size 7 is not divisible by page size 8192 P00 DEBUG: Protocol::Local::Process->process: all jobs complete -P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 25 -P00 INFO: incr backup size = 25B +P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 34 +P00 INFO: incr backup size = 34B P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 P00 DEBUG: Storage::Local->pathSync(): strPathExp = <REPO:BACKUP>/[BACKUP-INCR-2] @@ -2559,6 +2574,7 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"3905d5be2ec8d67f41435dab5e0dcda3ae47455d","master":true,"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} diff --git a/test/expect/mock-all-002.log b/test/expect/mock-all-002.log index 3a367fff9..0898270cd 100644 --- a/test/expect/mock-all-002.log +++ b/test/expect/mock-all-002.log @@ -1998,8 +1998,9 @@ P00 DEBUG: Backup::Backup->processManifest: reference pg_data/global/pg_con P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/12000 to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/postgresql.conf to [BACKUP-FULL-2] P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/badchecksum.txt, pg_data/badchecksum.txt, 11, [undef], 0, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/badchecksum.txt, strOp = backupFile, strQueue = pg_data -P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-2], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 P00 DEBUG: Backup::Backup->processManifest: reference pg_data/pg_stat/global.stat to [BACKUP-FULL-2] +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/changesize.txt, pg_data/changesize.txt, 4, [undef], 0, [BACKUP-INCR-1], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/changesize.txt, strOp = backupFile, strQueue = pg_data P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/32768/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/16384/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/PG_VERSION to [BACKUP-FULL-2] @@ -2012,16 +2013,19 @@ P00 DEBUG: Protocol::Local::Process->init: init local process: iDirection = P00 DEBUG: Protocol::Local::Process->init=>: bResult = true P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/badchecksum.txt, strQueueIdx = 0 P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 11, 11, f927212cd08d11a42a666b2f04235398e9ceeb51, [undef]), strKey = pg_data/badchecksum.txt +P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/changesize.txt, strQueueIdx = 0 +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 50%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 4, 4, 88087292ed82e26f3eb824d0bffc05ccf7a30f8d, [undef]), strKey = pg_data/changesize.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strQueueIdx = 1 -P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 61%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 -P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/changesize.txt (4B, 68%) checksum 88087292ed82e26f3eb824d0bffc05ccf7a30f8d +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, 14c44cef6287269b08d41de489fd492bb9fc795d, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt P00 DEBUG: Protocol::Local::Process->process: no jobs found, stop local: iHostConfigIdx = [undef], iHostIdx = 0, iProcessId = 1, strHostType = [undef] P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum 14c44cef6287269b08d41de489fd492bb9fc795d P00 WARN: page misalignment in file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt: file size 7 is not divisible by page size 8192 P00 DEBUG: Protocol::Local::Process->process: all jobs complete -P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 18 -P00 INFO: incr backup size = 18B +P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 22 +P00 INFO: incr backup size = 22B P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = db P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 @@ -2225,10 +2229,11 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"88087292ed82e26f3eb824d0bffc05ccf7a30f8d","master":true,"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} -pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"d85de07d6421d90aa9191c11c889bfde43680f0f","checksum-page":false,"size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"14c44cef6287269b08d41de489fd492bb9fc795d","checksum-page":false,"size":[SIZE],"timestamp":[TIMESTAMP-2]} [target:file:default] group="[GROUP-1]" @@ -2403,6 +2408,10 @@ P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt P00 DEBUG: Backup::Backup->resumeClean(): oAbortedManifest = [object], oManifest = [object], oStorageRepo = [object], strBackupLabel = [BACKUP-INCR-2] P00 DETAIL: clean resumed backup path: [TEST_PATH]/backup/repo/backup/db/[BACKUP-INCR-2] P00 DEBUG: Storage::Local->manifest(): strPathExp = <REPO:BACKUP>/[BACKUP-INCR-2] +P00 DEBUG: Backup::Backup->resumeClean: remove file pg_data/changesize.txt +P00 DEBUG: Backup::Backup->resumeClean: remove file pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P00 DEBUG: Storage::Local->remove(): bIgnoreMissing = <true>, bRecurse = <false>, xstryPathFileExp = (<REPO:BACKUP>/[BACKUP-INCR-2]/pg_data/changesize.txt, <REPO:BACKUP>/[BACKUP-INCR-2]/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt) +P00 DEBUG: Storage::Local->remove=>: bRemoved = true P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/backup/repo/backup/db/[BACKUP-INCR-2]/backup.manifest P00 DEBUG: Storage::Local->exists=>: bExists = false P00 DEBUG: Storage::Local->openWrite(): bAtomic = <false>, bPathCreate = <false>, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/backup/repo/backup/db/[BACKUP-INCR-2]/backup.manifest.copy @@ -2419,8 +2428,9 @@ P00 DEBUG: Backup::Backup->processManifest: reference pg_data/global/pg_con P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/1/12000 to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/postgresql.conf to [BACKUP-FULL-2] P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/badchecksum.txt, pg_data/badchecksum.txt, 11, bogus, 0, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/badchecksum.txt, strOp = backupFile, strQueue = pg_data +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/changesize.txt, pg_data/changesize.txt, 9, [undef], 0, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, [undef]), rParamSecure = [undef], strKey = pg_data/changesize.txt, strOp = backupFile, strQueue = pg_data P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, 7, [undef], 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, strOp = backupFile, strQueue = pg_tblspc/2 -P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 +P00 DEBUG: Protocol::Local::Process->queueJob(): iHostConfigIdx = 1, rParam = ([TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, 7, [undef], 1, [BACKUP-INCR-2], 0, 3, [MODIFICATION-TIME-1], 1, {iWalId => 65535, iWalOffset => 65535}), rParamSecure = [undef], strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strOp = backupFile, strQueue = pg_tblspc/1 P00 DEBUG: Backup::Backup->processManifest: reference pg_data/pg_stat/global.stat to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/32768/PG_VERSION to [BACKUP-FULL-2] P00 DEBUG: Backup::Backup->processManifest: reference pg_data/base/16384/PG_VERSION to [BACKUP-FULL-2] @@ -2434,20 +2444,25 @@ P00 DEBUG: Protocol::Local::Process->init: init local process: iDirection = P00 DEBUG: Protocol::Local::Process->init=>: bResult = true P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/badchecksum.txt, strQueueIdx = 0 P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (2, 11, 11, f927212cd08d11a42a666b2f04235398e9ceeb51, [undef]), strKey = pg_data/badchecksum.txt +P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_data/changesize.txt, strQueueIdx = 0 +P00 WARN: resumed backup file pg_data/badchecksum.txt does not have expected checksum bogus. 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. + NOTE: this does not indicate a problem with the PostgreSQL page checksums. +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 32%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 9, 9, 3905d5be2ec8d67f41435dab5e0dcda3ae47455d, [undef]), strKey = pg_data/changesize.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt, strQueueIdx = 1 -P00 WARN: resumed backup file pg_data/badchecksum.txt should have checksum bogus but actually has checksum f927212cd08d11a42a666b2f04235398e9ceeb51. The file will be recopied and backup will continue but this may be an issue unless the backup temp path is known to be corrupted. -P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/changesize.txt (9B, 58%) checksum 3905d5be2ec8d67f41435dab5e0dcda3ae47455d P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, dc7f76e43c46101b47acc55ae4d593a9e6983578, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt P00 DEBUG: Protocol::Local::Process->process: get job from queue: iHostIdx = 0, iProcessId = 1, strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt, strQueueIdx = 2 -P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 72%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 79%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 P00 WARN: page misalignment in file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt: file size 7 is not divisible by page size 8192 -P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (0, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, [undef]), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt +P00 DEBUG: Protocol::Local::Process->process: job complete: iProcessId = 1, rResult = (1, 7, 7, d85de07d6421d90aa9191c11c889bfde43680f0f, {bAlign => 0, bValid => 0}), strKey = pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt P00 DEBUG: Protocol::Local::Process->process: no jobs found, stop local: iHostConfigIdx = [undef], iHostIdx = 0, iProcessId = 1, strHostType = [undef] P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P01 DETAIL: checksum resumed file [TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f +P00 WARN: page misalignment in file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt: file size 7 is not divisible by page size 8192 P00 DEBUG: Protocol::Local::Process->process: all jobs complete -P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 25 -P00 INFO: incr backup size = 25B +P00 DEBUG: Backup::Backup->processManifest=>: lSizeTotal = 34 +P00 INFO: incr backup size = 34B P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = db P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 @@ -2666,6 +2681,7 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"3905d5be2ec8d67f41435dab5e0dcda3ae47455d","master":true,"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","size":[SIZE],"timestamp":[TIMESTAMP-2]} diff --git a/test/expect/mock-all-003.log b/test/expect/mock-all-003.log index 7eeb58d70..bcb3e89f6 100644 --- a/test/expect/mock-all-003.log +++ b/test/expect/mock-all-003.log @@ -646,10 +646,11 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"88087292ed82e26f3eb824d0bffc05ccf7a30f8d","master":true,"repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} -pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"d85de07d6421d90aa9191c11c889bfde43680f0f","checksum-page":false,"repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt={"checksum":"14c44cef6287269b08d41de489fd492bb9fc795d","checksum-page":false,"repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} [target:file:default] group="[GROUP-1]" @@ -717,8 +718,10 @@ P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.inf P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2] P00 WARN: aborted backup [BACKUP-INCR-2] of same type exists, will be cleaned to remove invalid files and resumed P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt -P00 WARN: resumed backup file pg_data/badchecksum.txt should have checksum bogus but actually has checksum f927212cd08d11a42a666b2f04235398e9ceeb51. The file will be recopied and backup will continue but this may be an issue unless the backup temp path is known to be corrupted. +P00 WARN: resumed backup file pg_data/badchecksum.txt does not have expected checksum bogus. 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. + NOTE: this does not indicate a problem with the PostgreSQL page checksums. P00 WARN: page misalignment in file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt: file size 7 is not divisible by page size 8192 +P00 WARN: page misalignment in file db-master:[TEST_PATH]/db-master/db/base/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt: file size 7 is not divisible by page size 8192 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf ---------------------------------------------------------- @@ -832,6 +835,7 @@ pg_data/base/32768/33000={"checksum":"4a383e4fb8b5cd2a4e8fab91ef63dce48e532a2f", pg_data/base/32768/33000.32767={"checksum":"21e2c7c1a326682c07053b7d6a5a40dbd49c2ec5","checksum-page":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/33001={"checksum":"6bf316f11d28c28914ea9be92c00de9bea6d9a6b","checksum-page":false,"checksum-page-error":[0,[3,5],7],"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/base/32768/PG_VERSION={"checksum":"184473f470864e067ee3a22e64b47b0a1c356f29","reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} +pg_data/changesize.txt={"checksum":"3905d5be2ec8d67f41435dab5e0dcda3ae47455d","master":true,"repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-1]} pg_data/global/pg_control={"checksum":"b4a3adade1e81ebfc7e9a27bca0887a347d81522","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/pg_stat/global.stat={"checksum":"e350d5ce0153f3e22d5db21cf2a4eff00f3ee877","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} pg_data/postgresql.conf={"checksum":"6721d92c9fcdf4248acff1f9a1377127d9064807","master":true,"reference":"[BACKUP-FULL-2]","repo-size":[SIZE],"size":[SIZE],"timestamp":[TIMESTAMP-2]} diff --git a/test/lib/pgBackRestTest/Module/Mock/MockAllTest.pm b/test/lib/pgBackRestTest/Module/Mock/MockAllTest.pm index a3a464d2d..c5acfaeee 100644 --- a/test/lib/pgBackRestTest/Module/Mock/MockAllTest.pm +++ b/test/lib/pgBackRestTest/Module/Mock/MockAllTest.pm @@ -855,10 +855,13 @@ sub run $oHostDbMaster->manifestPathCreate(\%oManifest, MANIFEST_TARGET_PGTBLSPC . '/1', '16384'); $oHostDbMaster->manifestFileCreate( - \%oManifest, MANIFEST_TARGET_PGTBLSPC . '/1', '16384/tablespace1.txt', 'TBLSPC1', - 'd85de07d6421d90aa9191c11c889bfde43680f0f', $lTime, undef, undef, false); + \%oManifest, MANIFEST_TARGET_PGTBLSPC . '/1', '16384/tablespace1.txt', 'TBLSPCB', + '14c44cef6287269b08d41de489fd492bb9fc795d', $lTime - 100, undef, undef, false); $oHostDbMaster->manifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'badchecksum.txt', 'BADCHECKSUM', 'f927212cd08d11a42a666b2f04235398e9ceeb51', $lTime, undef, true); + $oHostDbMaster->manifestFileCreate( + \%oManifest, MANIFEST_TARGET_PGDATA, 'changesize.txt', 'SIZE', '88087292ed82e26f3eb824d0bffc05ccf7a30f8d', $lTime, + undef, true); # Create temp dir and file that will be ignored if (!$bRemote) @@ -883,11 +886,30 @@ sub run forceStorageRemove(storageRepo(), $strResumePath); forceStorageMove(storageRepo(), 'backup/' . $self->stanza() . "/${strBackup}", $strResumePath); - $oHostBackup->manifestMunge( - basename($strResumePath), - {&MANIFEST_SECTION_TARGET_FILE => - {(&MANIFEST_TARGET_PGDATA . '/badchecksum.txt') => {&MANIFEST_SUBKEY_CHECKSUM => BOGUS}}}, - false); + # Munge manifest so the resumed file in the repo appears to be bad + if ($bRemote) + { + $oHostBackup->manifestMunge( + basename($strResumePath), + {&MANIFEST_SECTION_TARGET_FILE => + {(&MANIFEST_TARGET_PGDATA . '/badchecksum.txt') => {&MANIFEST_SUBKEY_CHECKSUM => BOGUS}}}, + false); + } + # Change contents of resumed file without changing size so it will throw a nasty error about the repo having been corrupted + else + { + storageRepo()->put("${strResumePath}/pg_data/badchecksum.txt", 'BDDCHECKSUM'); + } + + # Change contents/size of a db file to make sure it recopies (and does not resume) + $oHostDbMaster->manifestFileCreate( + \%oManifest, MANIFEST_TARGET_PGDATA, 'changesize.txt', 'SIZE+MORE', '3905d5be2ec8d67f41435dab5e0dcda3ae47455d', $lTime, + undef, true); + + # Change contents/time of a db file to make sure it recopies (and does not resume) + $oHostDbMaster->manifestFileCreate( + \%oManifest, MANIFEST_TARGET_PGTBLSPC . '/1', '16384/tablespace1.txt', 'TBLSPC1', + 'd85de07d6421d90aa9191c11c889bfde43680f0f', $lTime, undef, undef, false); # Remove the main manifest so the backup appears aborted forceStorageRemove(storageRepo(), "${strResumePath}/" . FILE_MANIFEST); @@ -911,6 +933,9 @@ sub run {oExpectedManifest => \%oManifest, strTest => TEST_BACKUP_RESUME, strOptionalParam => '--' . cfgOptionName(CFGOPT_PROCESS_MAX) . '=1'}); + # Remove the size-changed test file to avoid expect log churn + $oHostDbMaster->manifestFileRemove(\%oManifest, MANIFEST_TARGET_PGDATA, 'changesize.txt'); + # Resume Diff Backup #--------------------------------------------------------------------------------------------------------------------------- $strType = CFGOPTVAL_BACKUP_TYPE_DIFF; [parent: 3d07e01fe920]