1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-03 00:26:59 +02:00

Improve archive-push command fault tolerance.

3b8f0ef missed some cases that could cause archive-push to fail:

* Checking archive info.
* Checking to see if a WAL segment already exists.

These cases are now handled so archive-push can succeed on any valid repos.
This commit is contained in:
David Steele
2021-03-25 12:54:49 -04:00
committed by GitHub
parent 2789d3b620
commit 01b8e2258f
16 changed files with 305 additions and 142 deletions

View File

@ -135,7 +135,7 @@ sub run
$oHostDbPrimary->executeSimple(
$strCommandPush . " ${strWalPath}/${strSourceFile1}",
{iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()});
{iExpectedExitStatus => ERROR_REPO_INVALID, oLogTest => $self->expect()});
$oHostDbPrimary->executeSimple(
$strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",
@ -293,7 +293,7 @@ sub run
$oHostDbPrimary->executeSimple(
$strCommandPush . " ${strWalPath}/${strSourceFile}",
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()});
{iExpectedExitStatus => ERROR_REPO_INVALID, oLogTest => $self->expect()});
$oHostDbPrimary->executeSimple(
$strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",