1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

Improved error message when the restore command detects the presence of postmaster.pid.

Suggested by Yogesh Sharma.
This commit is contained in:
David Steele
2017-04-12 09:53:07 -04:00
parent b0119914d4
commit f5f8d51366
4 changed files with 29 additions and 1 deletions
@@ -543,6 +543,15 @@ sub run
$strFullBackup, \%oManifest, undef, $bDelta, $bForce, undef, undef, undef, undef, undef, undef,
'error on existing linked file', ERROR_PATH_NOT_EMPTY, '--log-level-console=warn --link-all');
# Error when postmaster.pid is present
executeTest('touch ' . $oHostDbMaster->dbBasePath() . qw(/) . DB_FILE_POSTMASTERPID);
$oHostDbMaster->restore(
$strFullBackup, \%oManifest, undef, $bDelta, $bForce, undef, undef, undef, undef, undef, undef,
'error on postmaster.pid exists', ERROR_POSTMASTER_RUNNING, '--log-level-console=warn');
executeTest('rm ' . $oHostDbMaster->dbBasePath() . qw(/) . DB_FILE_POSTMASTERPID);
# Now a combination of remapping
$bDelta = true;