1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Allow archive-get command to run when stanza is stopped.

The restore command can run while the stanza is stopped so it makes sense for the archive-get command to follow the same rule.

The important thing is to ensure that all commands that write to the repository are stopped when the stanza is stopped.
This commit is contained in:
David Steele 2023-08-29 13:49:49 -04:00
parent 8424737697
commit fbd992adc7
3 changed files with 12 additions and 5 deletions

View File

@ -28,6 +28,17 @@
<p>Multi-stanza check command.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="tom.swartz"/>
<release-item-reviewer id="david.christensen"/>
<release-item-reviewer id="reid.thompson"/>
</release-item-contributor-list>
<p>Allow <cmd>archive-get</cmd> command to run when stanza is stopped.</p>
</release-item>
<release-item>
<github-pull-request id="2136"/>

View File

@ -36,9 +36,6 @@ archiveGetFile(
ArchiveGetFileResult result = {.warnList = strLstNew()};
// Test for stop file
lockStopTest();
// Check all files in the actual list and return as soon as one is copied
bool copied = false;

View File

@ -300,8 +300,7 @@ sub run
$oHostDbPrimary->executeSimple($strCommandPush . " ${strWalPath}/${strSourceFile}", {iExpectedExitStatus => ERROR_STOP});
$oHostDbPrimary->executeSimple(
$strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG", {iExpectedExitStatus => ERROR_STOP});
$oHostDbPrimary->executeSimple($strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG");
$oHostDbPrimary->start({strStanza => $oHostDbPrimary->stanza()});