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

Added error when archive_mode=always is configured.

This commit is contained in:
David Steele
2016-01-09 23:08:54 -05:00
parent 7f0f8823df
commit 29102b2887
8 changed files with 43 additions and 5 deletions

View File

@ -286,12 +286,14 @@ sub BackRestTestBackup_ClusterStart
my $iPort = shift;
my $bHotStandby = shift;
my $bArchive = shift;
my $bArchiveAlways = shift;
# Set default
$iPort = defined($iPort) ? $iPort : BackRestTestCommon_DbPortGet();
$strPath = defined($strPath) ? $strPath : BackRestTestCommon_DbCommonPathGet();
$bHotStandby = defined($bHotStandby) ? $bHotStandby : false;
$bArchive = defined($bArchive) ? $bArchive : true;
$bArchiveAlways = defined($bArchiveAlways) ? $bArchiveAlways : false;
# Make sure postgres is not running
if (-e $strPath . '/postmaster.pid')
@ -311,7 +313,14 @@ sub BackRestTestBackup_ClusterStart
{
if (BackRestTestCommon_DbVersion() >= '8.3')
{
$strCommand .= " -c archive_mode=on";
if (BackRestTestCommon_DbVersion() >= '9.5' && $bArchiveAlways)
{
$strCommand .= " -c archive_mode=always";
}
else
{
$strCommand .= " -c archive_mode=on";
}
}
$strCommand .= " -c archive_command='${strArchive}'";