1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-05-31 22:49:46 +02:00

Restore bIgnoreMissing flag in backupFile() lost in storage refactor.

The test to make sure that some files (e.g. pg_control) do not get removed during the backup was lost during the storage refactor committed at de7fc37f.

This did not impact the integrity of the backups, but bring it back since it is a nice sanity check.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang 2018-09-18 10:18:39 -04:00 committed by David Steele
parent 03003562d8
commit 052e483057
3 changed files with 10 additions and 2 deletions

View File

@ -68,6 +68,14 @@
<p>Add helper for repository storage.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="cynthia.shang"/>
</release-item-contributor-list>
<p>Restore <code>bIgnoreMissing</code> flag in <code>backupFile()</code> lost in storage refactor.</p>
</release-item>
<release-item>
<p>Migrate <code>walIsPartial()</code>, <code>walIsSegment()</code>, and <code>walSegmentFind()</code> from Perl to C.</p>
</release-item>

View File

@ -136,7 +136,7 @@ sub backupFile
}
# Open the file
my $oSourceFileIo = storageDb()->openRead($strDbFile, {rhyFilter => $rhyFilter, bIgnoreMissing => true});
my $oSourceFileIo = storageDb()->openRead($strDbFile, {rhyFilter => $rhyFilter, bIgnoreMissing => $bIgnoreMissing});
# If source file exists
if (defined($oSourceFileIo))

View File

@ -3188,7 +3188,7 @@ static const EmbeddedModule embeddedModule[] =
"push(@{$rhyFilter}, {strClass => STORAGE_FILTER_GZIP, rxyParam => [{iLevel => $iCompressLevel}]});\n"
"}\n"
"\n\n"
"my $oSourceFileIo = storageDb()->openRead($strDbFile, {rhyFilter => $rhyFilter, bIgnoreMissing => true});\n"
"my $oSourceFileIo = storageDb()->openRead($strDbFile, {rhyFilter => $rhyFilter, bIgnoreMissing => $bIgnoreMissing});\n"
"\n\n"
"if (defined($oSourceFileIo))\n"
"{\n"