1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-13 01:00:23 +02:00

Add hint when checksum delta is enabled after a timeline switch.

This warning is normal when restoring a backup or promoting a standby so add a hint to make that clear.
This commit is contained in:
David Steele
2020-06-16 13:20:01 -04:00
committed by GitHub
parent 1094a2d802
commit 11c192f30e
4 changed files with 21 additions and 2 deletions

View File

@ -30,6 +30,16 @@
<p>Improve error when <br-option>pg1-path</br-option> option missing for <cmd>archive-get</cmd> command.</p> <p>Improve error when <br-option>pg1-path</br-option> option missing for <cmd>archive-get</cmd> command.</p>
</release-item> </release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="matt.bunter"/>
<release-item-reviewer id="cynthia.shang"/>
</release-item-contributor-list>
<p>Add hint when checksum delta is enabled after a timeline switch.</p>
</release-item>
</release-improvement-list> </release-improvement-list>
<release-development-list> <release-development-list>
@ -8558,6 +8568,11 @@
<contributor-id type="github">mnullmei</contributor-id> <contributor-id type="github">mnullmei</contributor-id>
</contributor> </contributor>
<contributor id="matt.bunter">
<contributor-name-display>Matt Bunter</contributor-name-display>
<contributor-id type="github">mattbunter</contributor-id>
</contributor>
<contributor id="matt.kunkel"> <contributor id="matt.kunkel">
<contributor-name-display>Matt Kunkel</contributor-name-display> <contributor-name-display>Matt Kunkel</contributor-name-display>
<contributor-id type="github">mtkunkel</contributor-id> <contributor-id type="github">mtkunkel</contributor-id>

View File

@ -1120,7 +1120,8 @@ manifestBuildIncr(Manifest *this, const Manifest *manifestPrior, BackupType type
!strEq(strSubN(archiveStart, 0, 8), strSubN(manifestData(manifestPrior)->archiveStop, 0, 8))) !strEq(strSubN(archiveStart, 0, 8), strSubN(manifestData(manifestPrior)->archiveStop, 0, 8)))
{ {
LOG_WARN_FMT( LOG_WARN_FMT(
"a timeline switch has occurred since the %s backup, enabling delta checksum", "a timeline switch has occurred since the %s backup, enabling delta checksum\n"
"HINT: this is normal after restoring from backup or promoting a standby.",
strPtr(manifestData(manifestPrior)->backupLabel)); strPtr(manifestData(manifestPrior)->backupLabel));
this->data.backupOptionDelta = BOOL_TRUE_VAR; this->data.backupOptionDelta = BOOL_TRUE_VAR;

View File

@ -2457,6 +2457,7 @@ testRun(void)
"P00 INFO: execute non-exclusive pg_start_backup(): backup begins after the next regular checkpoint completes\n" "P00 INFO: execute non-exclusive pg_start_backup(): backup begins after the next regular checkpoint completes\n"
"P00 INFO: backup start archive = 0000002C05DB8EB000000000, lsn = 5db8eb0/0\n" "P00 INFO: backup start archive = 0000002C05DB8EB000000000, lsn = 5db8eb0/0\n"
"P00 WARN: a timeline switch has occurred since the 20191027-181320F backup, enabling delta checksum\n" "P00 WARN: a timeline switch has occurred since the 20191027-181320F backup, enabling delta checksum\n"
" HINT: this is normal after restoring from backup or promoting a standby.\n"
"P01 DETAIL: match file from prior backup {[path]}/pg1/global/pg_control (8KB, [PCT]) checksum [SHA1]\n" "P01 DETAIL: match file from prior backup {[path]}/pg1/global/pg_control (8KB, [PCT]) checksum [SHA1]\n"
"P01 DETAIL: match file from prior backup {[path]}/pg1/postgresql.conf (11B, [PCT]) checksum [SHA1]\n" "P01 DETAIL: match file from prior backup {[path]}/pg1/postgresql.conf (11B, [PCT]) checksum [SHA1]\n"
"P01 DETAIL: match file from prior backup {[path]}/pg1/PG_VERSION (2B, [PCT]) checksum [SHA1]\n" "P01 DETAIL: match file from prior backup {[path]}/pg1/PG_VERSION (2B, [PCT]) checksum [SHA1]\n"

View File

@ -1483,7 +1483,9 @@ testRun(void)
TEST_RESULT_VOID( TEST_RESULT_VOID(
manifestBuildIncr(manifest, manifestPrior, backupTypeIncr, STRDEF("000000040000000400000004")), "incremental manifest"); manifestBuildIncr(manifest, manifestPrior, backupTypeIncr, STRDEF("000000040000000400000004")), "incremental manifest");
TEST_RESULT_LOG("P00 WARN: a timeline switch has occurred since the 20190101-010101F backup, enabling delta checksum"); TEST_RESULT_LOG(
"P00 WARN: a timeline switch has occurred since the 20190101-010101F backup, enabling delta checksum\n"
" HINT: this is normal after restoring from backup or promoting a standby.");
TEST_RESULT_BOOL(varBool(manifest->data.backupOptionDelta), true, "check delta is enabled"); TEST_RESULT_BOOL(varBool(manifest->data.backupOptionDelta), true, "check delta is enabled");