Asynchronous Archiving
- The archive-async option offloads WAL archiving to a separate process (or processes) to improve throughput. It works by looking ahead
to see which WAL segments are ready to be archived beyond the request that is currently making via the archive_command
. WAL segments are transferred to the archive directly from the pg_xlog directory and success is only returned by the archive_command
when the WAL segment has been safely stored in the archive.
+ The archive-async option offloads WAL archiving to a separate process (or processes) to improve throughput. It works by looking ahead
to see which WAL segments are ready to be archived beyond the request that is currently making via the archive_command
. WAL segments are transferred to the archive directly from the pg_xlog/pg_wal directory and success is only returned by the archive_command
when the WAL segment has been safely stored in the archive.
The spool directory is created to hold the current status of WAL archiving. Status files written into the spool directory are typically zero length and should consume a minimal amount of space (a few MB at most) and very little IO. All the information in this directory can be recreated so it is not necessary to preserve the spool directory if the cluster is moved to new hardware.
@@ -2258,7 +2258,7 @@
Drop default cluster and create the new demo cluster
-
+
pg_dropcluster {[pg-version-upgrade]} main
@@ -2287,7 +2287,7 @@
-y
-
+
pg_dropcluster {[pg-version-upgrade]} main
diff --git a/lib/pgBackRest/Archive/Common.pm b/lib/pgBackRest/Archive/Common.pm
index 181eefe85..879e97818 100644
--- a/lib/pgBackRest/Archive/Common.pm
+++ b/lib/pgBackRest/Archive/Common.pm
@@ -57,6 +57,7 @@ my $oWalMagicHash =
hex('0xD07E') => PG_VERSION_94,
hex('0xD087') => PG_VERSION_95,
hex('0xD093') => PG_VERSION_96,
+ hex('0xD097') => PG_VERSION_10,
};
####################################################################################################################################
@@ -193,7 +194,7 @@ sub walInfo
# Read magic
sysread($hFile, $tBlock, 2) == 2
- or confess &log(ERROR, "unable to read xlog magic");
+ or confess &log(ERROR, "unable to read wal magic");
my $iMagic = unpack('S', $tBlock);
@@ -219,7 +220,7 @@ sub walInfo
# Check flags to be sure the long header is present (this is an extra check to be sure the system id exists)
#-------------------------------------------------------------------------------------------------------------------------------
sysread($hFile, $tBlock, 2) == 2
- or confess &log(ERROR, "unable to read xlog info");
+ or confess &log(ERROR, "unable to read wal info");
my $iFlag = unpack('S', $tBlock);
@@ -353,7 +354,7 @@ push @EXPORT, qw(walSegmentFind);
####################################################################################################################################
# walPath
#
-# Generates the location of the pg_xlog directory using a relative xlog path and the supplied db path.
+# Generates the location of the wal directory using a relative wal path and the supplied db path.
####################################################################################################################################
sub walPath
{
@@ -378,7 +379,7 @@ sub walPath
if (!defined($strDbPath))
{
confess &log(ERROR,
- "option 'db-path' must be specified when relative xlog paths are used\n" .
+ "option 'db-path' must be specified when relative wal paths are used\n" .
"HINT: Is \%f passed to ${strCommand} instead of \%p?\n" .
"HINT: PostgreSQL may pass relative paths even with \%p depending on the environment.",
ERROR_OPTION_REQUIRED);
diff --git a/lib/pgBackRest/Backup/Backup.pm b/lib/pgBackRest/Backup/Backup.pm
index 467594a0a..67ff5de2e 100644
--- a/lib/pgBackRest/Backup/Backup.pm
+++ b/lib/pgBackRest/Backup/Backup.pm
@@ -642,7 +642,8 @@ sub process
}
# Declare the backup manifest
- my $oBackupManifest = new pgBackRest::Manifest("$strBackupPath/" . FILE_MANIFEST, false);
+ my $oBackupManifest = new pgBackRest::Manifest(
+ "$strBackupPath/" . FILE_MANIFEST, {bLoad => false, strDbVersion => $strDbVersion});
# Backup settings
$oBackupManifest->set(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_TYPE, undef, $strType);
@@ -659,7 +660,6 @@ sub process
# Database settings
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_ID, undef, $iDbHistoryId);
- $oBackupManifest->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $strDbVersion);
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CONTROL, undef, $iControlVersion);
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CATALOG, undef, $iCatalogVersion);
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_SYSTEM_ID, undef, $ullDbSysId);
@@ -790,7 +790,7 @@ sub process
$oBackupManifest->boolSet(MANIFEST_SECTION_BACKUP_OPTION, MANIFEST_KEY_CHECKSUM_PAGE, undef, cfgOption(CFGOPT_CHECKSUM_PAGE));
# Build the manifest
- $oBackupManifest->build($oStorageDbMaster, $strDbVersion, $strDbMasterPath, $oLastManifest, cfgOption(CFGOPT_ONLINE),
+ $oBackupManifest->build($oStorageDbMaster, $strDbMasterPath, $oLastManifest, cfgOption(CFGOPT_ONLINE),
$hTablespaceMap, $hDatabaseMap);
&log(TEST, TEST_MANIFEST_BUILD);
@@ -901,11 +901,11 @@ sub process
$oStorageRepo->copy(
STORAGE_REPO_ARCHIVE . "/${strArchiveId}/${strArchiveFile}",
- STORAGE_REPO_BACKUP . "/${strBackupLabel}/" . MANIFEST_TARGET_PGDATA . "/pg_xlog/${strArchive}" .
- ($bCompress ? qw{.} . COMPRESS_EXT : ''));
+ STORAGE_REPO_BACKUP . "/${strBackupLabel}/" . MANIFEST_TARGET_PGDATA . qw{/} . $oBackupManifest->walPath() .
+ "/${strArchive}" . ($bCompress ? qw{.} . COMPRESS_EXT : ''));
# Add the archive file to the manifest so it can be part of the restore and checked in validation
- my $strPathLog = MANIFEST_TARGET_PGDATA . '/pg_xlog';
+ my $strPathLog = MANIFEST_TARGET_PGDATA . qw{/} . $oBackupManifest->walPath();
my $strFileLog = "${strPathLog}/${strArchive}";
# Add file to manifest
diff --git a/lib/pgBackRest/Check/Check.pm b/lib/pgBackRest/Check/Check.pm
index 513fcf45d..db51d8150 100644
--- a/lib/pgBackRest/Check/Check.pm
+++ b/lib/pgBackRest/Check/Check.pm
@@ -111,7 +111,7 @@ sub process
# If able to get the archive id then force archiving and check the arrival of the archived WAL file with the time specified
if ($iResult == 0 && !$oDb->isStandby())
{
- $strWalSegment = $oDb->xlogSwitch();
+ $strWalSegment = $oDb->walSwitch();
eval
{
@@ -142,14 +142,14 @@ sub process
}
else
{
- &log(INFO, "switch xlog cannot be performed on the standby, all other checks passed successfully");
+ &log(INFO, 'switch ' . $oDb->walId() . ' cannot be performed on the standby, all other checks passed successfully');
}
}
else
{
&log(ERROR, $strResultMessage, $iResult);
- # If a switch xlog was attempted, then alert the user to the WAL that did not reach the archive
+ # If a WAL switch was attempted, then alert the user that the WAL that did not reach the archive
if (defined($strWalSegment))
{
&log(WARN,
diff --git a/lib/pgBackRest/Config/ConfigHelpData.pm b/lib/pgBackRest/Config/ConfigHelpData.pm
index 311dc7660..e7931538e 100644
--- a/lib/pgBackRest/Config/ConfigHelpData.pm
+++ b/lib/pgBackRest/Config/ConfigHelpData.pm
@@ -60,8 +60,8 @@ my $oConfigHelpData =
"\n" .
"Even though WAL segments will be restored with the backup, PostgreSQL will ignore them if a recovery.conf file " .
"exists and instead use archive_command to fetch WAL segments. Specifying type=none when restoring will not " .
- "create recovery.conf and force PostgreSQL to use the WAL segments in pg_xlog. This will get the database " .
- "cluster to a consistent state."
+ "create recovery.conf and force PostgreSQL to use the WAL segments in pg_xlog/pg_wal. This will get the " .
+ "database cluster to a consistent state."
},
# ARCHIVE-QUEUE-MAX Option Help
@@ -1086,8 +1086,8 @@ my $oConfigHelpData =
"database cluster. In order for this to work PostgreSQL should be shut down and pgBackRest will " .
"generate an error if it is not.\n" .
"\n" .
- "The purpose of this option is to allow offline backups. The pg_xlog directory is copied as-is and " .
- "archive-check is automatically disabled for the backup."
+ "The purpose of this option is to allow offline backups. The pg_xlog/pg_wal directory is copied as-is " .
+ "and archive-check is automatically disabled for the backup."
},
'process-max' => 'section',
@@ -1139,14 +1139,15 @@ my $oConfigHelpData =
"The check command validates that pgBackRest and the archive_command setting are configured correctly for " .
"archiving and backups. It detects misconfigurations, particularly in archiving, that result in incomplete " .
"backups because required WAL segments did not reach the archive. The command can be run on the database or " .
- "the backup host. The command may also be run on the standby host, however, since pg_switch_xlog() cannot " .
- "be performed on the standby, the command will only test the repository configuration.\n" .
+ "the backup host. The command may also be run on the standby host, however, since " .
+ "pg_switch_xlog()/pg_switch_wal() cannot be performed on the standby, the command will only test the " .
+ "repository configuration.\n" .
"\n" .
- "Note that pg_create_restore_point('pgBackRest Archive Check') and pg_switch_xlog() are called to force " .
- "PostgreSQL to archive a WAL segment. Restore points are only supported in PostgreSQL >= 9.1 so for older " .
- "versions the check command may fail if there has been no write activity since the last log rotation, " .
- "therefore it is recommended that activity be generated by the user if there have been no writes since the " .
- "last xlog switch before running the check command.",
+ "Note that pg_create_restore_point('pgBackRest Archive Check') and pg_switch_xlog()/pg_switch_wal() are called " .
+ "to force PostgreSQL to archive a WAL segment. Restore points are only supported in PostgreSQL >= 9.1 so " .
+ "for older versions the check command may fail if there has been no write activity since the last log " .
+ "rotation, therefore it is recommended that activity be generated by the user if there have been no writes " .
+ "since the last WAL switch before running the check command.",
option =>
{
@@ -1479,8 +1480,8 @@ my $oConfigHelpData =
"* time - recover to the time specified in --target.\n" .
"* preserve - preserve the existing recovery.conf file.\n" .
"* none - no recovery.conf file is written so PostgreSQL will attempt to achieve consistency using WAL " .
- "segments present in pg_xlog. Provide the required WAL segments or use the archive-copy setting to " .
- "include them with the backup."
+ "segments present in pg_xlog/pg_wal. Provide the required WAL segments or use the archive-copy " .
+ "setting to include them with the backup."
}
}
},
diff --git a/lib/pgBackRest/Db.pm b/lib/pgBackRest/Db.pm
index 777e2c6ed..b08a22ab1 100644
--- a/lib/pgBackRest/Db.pm
+++ b/lib/pgBackRest/Db.pm
@@ -59,6 +59,10 @@ my $oPgControlVersionHash =
{
201608131 => PG_VERSION_96,
},
+ 1002 =>
+ {
+ 201707211 => PG_VERSION_10,
+ },
};
####################################################################################################################################
@@ -552,10 +556,21 @@ sub versionGet
}
# Get version and db-path from
- ($self->{strDbVersion}, $self->{strDbPath}) =
- $self->executeSqlRow("select (regexp_matches(split_part(version(), ' ', 2), '^[0-9]+\.[0-9]+'))[1], setting" .
- " from pg_settings where name = 'data_directory'");
+ (my $strVersionNum, $self->{strDbPath}) =
+ $self->executeSqlRow(
+ "select (select setting from pg_settings where name = 'server_version_num'), " .
+ " (select setting from pg_settings where name = 'data_directory')");
+ # Get first part of the major version - for 10 and above there will only be one part
+ $self->{strDbVersion} = substr($strVersionNum, 0, length($strVersionNum) - 4);
+
+ # Now retrieve the second part of the major version for versions less than 10
+ if ($self->{strDbVersion} < PG_VERSION_10)
+ {
+ $self->{strDbVersion} .= qw{.} . int(substr($strVersionNum, 1, 2));
+ }
+
+ # Check that the version is supported
my @stryVersionSupport = versionSupport();
if ($self->{strDbVersion} < $stryVersionSupport[0])
@@ -656,7 +671,7 @@ sub backupStart
($bStartFast ? "the requested immediate checkpoint" : "the next regular checkpoint") . " completes");
my ($strTimestampDbStart, $strArchiveStart, $strLsnStart) = $self->executeSqlRow(
- "select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text" .
+ "select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_" . $self->walId() . "file_name(lsn), lsn::text" .
" from pg_start_backup('${strLabel}'" .
($bStartFast ? ', true' : $self->{strDbVersion} >= PG_VERSION_84 ? ', false' : '') .
($self->{strDbVersion} >= PG_VERSION_96 ? ', false' : '') . ') as lsn');
@@ -687,13 +702,17 @@ sub backupStop
my ($strTimestampDbStop, $strArchiveStop, $strLsnStop, $strLabel, $strTablespaceMap) =
$self->executeSqlRow(
- "select to_char(clock_timestamp(), 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, " .
+ "select to_char(clock_timestamp(), 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_" .
+ $self->walId() . "file_name(lsn), lsn::text, " .
($self->{strDbVersion} >= PG_VERSION_96 ?
'labelfile, ' .
'case when length(trim(both \'\t\n \' from spcmapfile)) = 0 then null else spcmapfile end as spcmapfile' :
'null as labelfile, null as spcmapfile') .
' from pg_stop_backup(' .
- ($self->{strDbVersion} >= PG_VERSION_96 ? 'false)' : ') as lsn'));
+ # Add flag to use non-exclusive backup
+ ($self->{strDbVersion} >= PG_VERSION_96 ? 'false' : '') .
+ # Add flag to exit immediately after backup stop rather than waiting for WAL to archive (this is checked later)
+ ($self->{strDbVersion} >= PG_VERSION_10 ? ', false' : '') . ') as lsn');
# Build a hash of the files that need to be written to the backup
my $oFileHash =
@@ -783,33 +802,58 @@ sub configValidate
}
####################################################################################################################################
-# xlogSwitch
+# walId
+#
+# Returns 'wal' or 'xlog' depending on the version of PostgreSQL.
+####################################################################################################################################
+sub walId
+{
+ my $self = shift;
+
+ return $self->{strDbVersion} >= PG_VERSION_10 ? 'wal' : 'xlog';
+}
+
+####################################################################################################################################
+# lsnId
+#
+# Returns 'lsn' or 'location' depending on the version of PostgreSQL.
+####################################################################################################################################
+sub lsnId
+{
+ my $self = shift;
+
+ return $self->{strDbVersion} >= PG_VERSION_10 ? 'lsn' : 'location';
+}
+
+####################################################################################################################################
+# walSwitch
#
# Forces a switch to the next transaction log in order to archive the current log.
####################################################################################################################################
-sub xlogSwitch
+sub walSwitch
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
- my $strOperation = logDebugParam(__PACKAGE__ . '->xlogSwitch');
+ my $strOperation = logDebugParam(__PACKAGE__ . '->walSwitch');
- # Create a restore point to ensure current xlog will be archived. For versions <= 9.0 activity will need to be generated by
- # the user if there have been no writes since the last xlog switch.
+ # Create a restore point to ensure current WAL will be archived. For versions <= 9.0 activity will need to be generated by
+ # the user if there have been no writes since the last WAL switch.
if ($self->{strDbVersion} >= PG_VERSION_91)
{
$self->executeSql("select pg_create_restore_point('" . BACKREST_NAME . " Archive Check');");
}
- my $strWalFileName = $self->executeSqlOne('select pg_xlogfile_name from pg_xlogfile_name(pg_switch_xlog());');
+ my $strWalFileName = $self->executeSqlOne(
+ 'select pg_' . $self->walId() . 'file_name from pg_' . $self->walId() . 'file_name(pg_switch_' . $self->walId() . '());');
- &log(INFO, "switch xlog ${strWalFileName}");
+ &log(INFO, "switch WAL ${strWalFileName}");
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
- {name => 'strXlogFileName', value => $strWalFileName}
+ {name => 'strWalFileName', value => $strWalFileName}
);
}
@@ -880,15 +924,19 @@ sub replayWait
# Monitor the replay location
do
{
+ my $strLastWalReplayLsnFunction =
+ 'pg_last_' . $self->walId() . '_replay_' . $self->lsnId() . '()';
+
# Get the replay location
- my $strLastReplayedLSN = $self->executeSqlOne("select coalesce(pg_last_xlog_replay_location()::text, '')");
+ my $strLastReplayedLSN = $self->executeSqlOne(
+ "select coalesce(${strLastWalReplayLsnFunction}::text, '')");
# Error if the replay location could not be retrieved
if ($strLastReplayedLSN eq '')
{
confess &log(
ERROR,
- "unable to query replay location on the standby using pg_last_xlog_replay_location()\n" .
+ "unable to query replay lsn on the standby using ${strLastWalReplayLsnFunction}\n" .
"Hint: Is this a standby?",
ERROR_ARCHIVE_TIMEOUT);
}
@@ -930,7 +978,7 @@ sub replayWait
if ($self->{strDbVersion} >= PG_VERSION_96)
{
- $strCheckpointLSN = $self->executeSqlOne('select checkpoint_location from pg_control_checkpoint()');
+ $strCheckpointLSN = $self->executeSqlOne('select checkpoint_' . $self->lsnId() .' from pg_control_checkpoint()');
if (lsnNormalize($strCheckpointLSN) le lsnNormalize($strTargetLSN))
{
diff --git a/lib/pgBackRest/DbVersion.pm b/lib/pgBackRest/DbVersion.pm
index 23620c5bf..c8be2fdd7 100644
--- a/lib/pgBackRest/DbVersion.pm
+++ b/lib/pgBackRest/DbVersion.pm
@@ -45,6 +45,8 @@ use constant PG_VERSION_95 => '9.5';
push @EXPORT, qw(PG_VERSION_95);
use constant PG_VERSION_96 => '9.6';
push @EXPORT, qw(PG_VERSION_96);
+use constant PG_VERSION_10 => '10';
+ push @EXPORT, qw(PG_VERSION_10);
use constant PG_VERSION_APPLICATION_NAME => PG_VERSION_90;
push @EXPORT, qw(PG_VERSION_APPLICATION_NAME);
diff --git a/lib/pgBackRest/Manifest.pm b/lib/pgBackRest/Manifest.pm
index 6623b74c4..5daff5564 100644
--- a/lib/pgBackRest/Manifest.pm
+++ b/lib/pgBackRest/Manifest.pm
@@ -166,12 +166,10 @@ use constant MANIFEST_SUBKEY_USER => 'user';
####################################################################################################################################
# Database locations for important files/paths
####################################################################################################################################
-use constant DB_PATH_PGXLOG_ARCHIVESTATUS => 'pg_xlog/archive_status';
- push @EXPORT, qw(DB_PATH_PGXLOG_ARCHIVESTATUS);
+use constant DB_PATH_ARCHIVESTATUS => 'archive_status';
+ push @EXPORT, qw(DB_PATH_ARCHIVESTATUS);
use constant DB_PATH_BASE => 'base';
push @EXPORT, qw(DB_PATH_BASE);
-use constant DB_PATH_PGCLOG => 'pg_clog';
- push @EXPORT, qw(DB_PATH_PGCLOG);
use constant DB_PATH_GLOBAL => 'global';
push @EXPORT, qw(DB_PATH_GLOBAL);
use constant DB_PATH_PGDYNSHMEM => 'pg_dynshmem';
@@ -192,8 +190,6 @@ use constant DB_PATH_PGSUBTRANS => 'pg_subtr
push @EXPORT, qw(DB_PATH_PGSUBTRANS);
use constant DB_PATH_PGTBLSPC => 'pg_tblspc';
push @EXPORT, qw(DB_PATH_PGTBLSPC);
-use constant DB_PATH_PGXLOG => 'pg_xlog';
- push @EXPORT, qw(DB_PATH_PGXLOG);
use constant DB_FILE_BACKUPLABEL => 'backup_label';
push @EXPORT, qw(DB_FILE_BACKUPLABEL);
@@ -226,12 +222,8 @@ use constant DB_FILE_PREFIX_TMP => 'pgsql_tm
####################################################################################################################################
# Manifest locations for important files/paths
####################################################################################################################################
-use constant MANIFEST_PATH_PGXLOG_ARCHIVESTATUS => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_PGXLOG_ARCHIVESTATUS;
- push @EXPORT, qw(MANIFEST_PATH_PGXLOG_ARCHIVESTATUS);
use constant MANIFEST_PATH_BASE => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_BASE;
push @EXPORT, qw(MANIFEST_PATH_BASE);
-use constant MANIFEST_PATH_PGCLOG => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_PGCLOG;
- push @EXPORT, qw(MANIFEST_PATH_PGCLOG);
use constant MANIFEST_PATH_GLOBAL => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_GLOBAL;
push @EXPORT, qw(MANIFEST_PATH_GLOBAL);
use constant MANIFEST_PATH_PGDYNSHMEM => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_PGDYNSHMEM;
@@ -252,8 +244,6 @@ use constant MANIFEST_PATH_PGSUBTRANS => MANIFEST_
push @EXPORT, qw(MANIFEST_PATH_PGSUBTRANS);
use constant MANIFEST_PATH_PGTBLSPC => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_PGTBLSPC;
push @EXPORT, qw(MANIFEST_PATH_PGTBLSPC);
-use constant MANIFEST_PATH_PGXLOG => MANIFEST_TARGET_PGDATA . '/' . DB_PATH_PGXLOG;
- push @EXPORT, qw(MANIFEST_PATH_PGXLOG);
use constant MANIFEST_FILE_BACKUPLABEL => MANIFEST_TARGET_PGDATA . '/' . DB_FILE_BACKUPLABEL;
push @EXPORT, qw(MANIFEST_FILE_BACKUPLABEL);
@@ -280,14 +270,6 @@ use constant MANIFEST_FILE_TABLESPACEMAP => MANIFEST_
use constant DB_USER_OBJECT_MINIMUM_ID => 16384;
push @EXPORT, qw(DB_USER_OBJECT_MINIMUM_ID);
-####################################################################################################################################
-# Expression to determine whether files can be copied from a standby
-####################################################################################################################################
-use constant COPY_STANDBY_EXPRESSION => '^(' . MANIFEST_TARGET_PGDATA . '\/' .
- '(' . DB_PATH_BASE . '|' . DB_PATH_GLOBAL . '|' .
- DB_PATH_PGCLOG . '|' . DB_PATH_PGMULTIXACT . ')|' .
- DB_PATH_PGTBLSPC . ')\/';
-
####################################################################################################################################
# new
####################################################################################################################################
@@ -302,21 +284,31 @@ sub new
$strFileName,
$bLoad,
$oStorage,
+ $strDbVersion,
) =
logDebugParam
(
__PACKAGE__ . '->new', \@_,
{name => 'strFileName', trace => true},
- {name => 'bLoad', required => false, trace => true},
+ {name => 'bLoad', optional => true, default => true, trace => true},
{name => 'oStorage', optional => true, default => storageRepo(), trace => true},
+ {name => 'strDbVersion', optional => true, trace => true},
);
- # Set defaults
- $bLoad = defined($bLoad) ? $bLoad : true;
-
# Init object and store variables
my $self = $class->SUPER::new($strFileName, {bLoad => $bLoad, oStorage => $oStorage});
+ # If manifest not loaded from a file then the db version must be set
+ if (!$bLoad)
+ {
+ if (!defined($strDbVersion))
+ {
+ &log(ASSERT, 'strDbVersion must be provided with bLoad = false');
+ }
+
+ $self->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $strDbVersion);
+ }
+
# Return from function and log return values if any
return logDebugReturn
(
@@ -565,7 +557,6 @@ sub build
(
$strOperation,
$oStorageDbMaster,
- $strDbVersion,
$strPath,
$oLastManifest,
$bOnline,
@@ -580,7 +571,6 @@ sub build
(
__PACKAGE__ . '->build', \@_,
{name => 'oStorageDbMaster'},
- {name => 'strDbVersion'},
{name => 'strPath'},
{name => 'oLastManifest', required => false},
{name => 'bOnline'},
@@ -686,10 +676,10 @@ sub build
$strManifestType = MANIFEST_VALUE_PATH;
}
- # Skip pg_xlog/* when doing an online backup. WAL will be restored from the archive or stored in pg_xlog at the end of the
- # backup if the archive-copy option is set.
- next if ($bOnline && $strFile =~ ('^' . MANIFEST_PATH_PGXLOG . '\/') &&
- $strFile !~ ('^' . MANIFEST_PATH_PGXLOG_ARCHIVESTATUS . '$'));
+ # Skip wal directory when doing an online backup. WAL will be restored from the archive or stored in the wal directory at
+ # the end of the backup if the archive-copy option is set.
+ next if ($bOnline && $strFile =~ (qw{^} . MANIFEST_TARGET_PGDATA . qw{/} . $self->walPath() . '\/') &&
+ $strFile !~ ('^' . MANIFEST_TARGET_PGDATA . qw{/} . $self->walPath() . qw{/} . DB_PATH_ARCHIVESTATUS . '$'));
# Skip all directories and files that start with pgsql_tmp. The files are removed when the server is restarted and the
# directories are recreated. Since temp files cannnot be created on the replica it makes sense to delete the directories
@@ -698,10 +688,10 @@ sub build
# Skip temporary statistics in pg_stat_tmp even when stats_temp_directory is set because PGSS_TEXT_FILE is always created
# there.
- next if $strFile =~ ('^' . MANIFEST_PATH_PGSTATTMP . '\/') && $strDbVersion >= PG_VERSION_84;
+ next if $strFile =~ ('^' . MANIFEST_PATH_PGSTATTMP . '\/') && $self->dbVersion() >= PG_VERSION_84;
# Skip pg_replslot/* since these files are generally not useful after a restore
- next if $strFile =~ ('^' . MANIFEST_PATH_PGREPLSLOT . '\/') && $strDbVersion >= PG_VERSION_94;
+ next if $strFile =~ ('^' . MANIFEST_PATH_PGREPLSLOT . '\/') && $self->dbVersion() >= PG_VERSION_94;
# Skip pg_subtrans/* since these files are reset
next if $strFile =~ ('^' . MANIFEST_PATH_PGSUBTRANS . '\/');
@@ -791,7 +781,7 @@ sub build
$hManifest->{$strName}{modification_time} + 0);
$self->set($strSection, $strFile, MANIFEST_SUBKEY_SIZE, $hManifest->{$strName}{size} + 0);
$self->boolSet($strSection, $strFile, MANIFEST_SUBKEY_MASTER,
- ($strFile eq MANIFEST_FILE_PGCONTROL || $strFile !~ COPY_STANDBY_EXPRESSION) ? true : false);
+ ($strFile eq MANIFEST_FILE_PGCONTROL || $self->isMasterFile($strFile)));
}
# Link destination required for link type only
@@ -807,7 +797,7 @@ sub build
{
# Only versions >= 9.0 have the special top-level tablespace path. Below 9.0 the database files are stored
# directly in the path referenced by the symlink.
- if ($strDbVersion >= PG_VERSION_90)
+ if ($self->dbVersion() >= PG_VERSION_90)
{
$strFilter = $self->tablespacePathGet();
}
@@ -821,8 +811,9 @@ sub build
$strPath = dirname("${strPath}/${strName}");
- $self->build($oStorageDbMaster, $strDbVersion, $strLinkDestination, undef, $bOnline, $hTablespaceMap, $hDatabaseMap,
- $strFile, $bTablespace, $strPath, $strFilter, $strLinkDestination);
+ $self->build(
+ $oStorageDbMaster, $strLinkDestination, undef, $bOnline, $hTablespaceMap, $hDatabaseMap, $strFile, $bTablespace,
+ $strPath, $strFilter, $strLinkDestination);
}
}
@@ -1172,6 +1163,51 @@ sub validate
return logDebugReturn($strOperation);
}
+####################################################################################################################################
+# dbVersion - version of PostgreSQL that the manifest is being built for
+####################################################################################################################################
+sub dbVersion
+{
+ my $self = shift;
+
+ return $self->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION);
+}
+
+####################################################################################################################################
+# xactPath - return the transaction directory based on the PostgreSQL version
+####################################################################################################################################
+sub xactPath
+{
+ my $self = shift;
+
+ return $self->dbVersion() >= PG_VERSION_10 ? 'pg_xact' : 'pg_clog';
+}
+
+####################################################################################################################################
+# walPath - return the wal directory based on the PostgreSQL version
+####################################################################################################################################
+sub walPath
+{
+ my $self = shift;
+
+ return $self->dbVersion() >= PG_VERSION_10 ? 'pg_wal' : 'pg_xlog';
+}
+
+####################################################################################################################################
+# isMasterFile
+#
+# Is this file required to copied from the master?
+####################################################################################################################################
+sub isMasterFile
+{
+ my $self = shift;
+ my $strFile = shift;
+
+ return
+ $strFile !~ ('^(' . MANIFEST_TARGET_PGDATA . '\/' . '(' . DB_PATH_BASE . '|' . DB_PATH_GLOBAL . '|' .
+ $self->xactPath() . '|' . DB_PATH_PGMULTIXACT . ')|' . DB_PATH_PGTBLSPC . ')\/');
+}
+
####################################################################################################################################
# isChecksumPage
#
diff --git a/lib/pgBackRest/Restore.pm b/lib/pgBackRest/Restore.pm
index 832055e7f..4c787c386 100644
--- a/lib/pgBackRest/Restore.pm
+++ b/lib/pgBackRest/Restore.pm
@@ -213,7 +213,7 @@ sub manifestLoad
# Load the manifest into a hash
my $oManifest = new pgBackRest::Manifest(
- storageDb()->pathGet($self->{strDbClusterPath} . '/' . FILE_MANIFEST), undef, {oStorage => storageDb()});
+ storageDb()->pathGet($self->{strDbClusterPath} . '/' . FILE_MANIFEST), {oStorage => storageDb()});
# If backup is latest then set it equal to backup label, else verify that requested backup and label match
my $strBackupLabel = $oManifest->get(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_LABEL);
diff --git a/src/postgres/pageChecksum.c b/src/postgres/pageChecksum.c
index 314e01920..9fd7f0aa6 100644
--- a/src/postgres/pageChecksum.c
+++ b/src/postgres/pageChecksum.c
@@ -71,18 +71,18 @@ For historical reasons, the 64-bit LSN value is stored as two 32-bit values.
***********************************************************************************************************************************/
typedef struct
{
- uint32 xlogid; /* high bits */
+ uint32 walid; /* high bits */
uint32 xrecoff; /* low bits */
-} PageXLogRecPtr;
+} PageWalRecPtr;
/***********************************************************************************************************************************
Space management information generic to any page. Only values required for pgBackRest are represented here.
- pd_lsn - identifies xlog record for last change to this page.
+ pd_lsn - identifies wal record for last change to this page.
pd_checksum - page checksum, if set.
-The LSN is used by the buffer manager to enforce the basic rule of WAL: "thou shalt write xlog before data". A dirty buffer cannot
-be dumped to disk until xlog has been flushed at least as far as the page's LSN.
+The LSN is used by the buffer manager to enforce the basic rule of WAL: "thou shalt write wal before data". A dirty buffer cannot
+be dumped to disk until wal has been flushed at least as far as the page's LSN.
pd_checksum stores the page checksum, if it has been set for this page; zero is a valid value for a checksum. If a checksum is not
in use then we leave the field unset. This will typically mean the field is zero though non-zero values may also be present if
@@ -94,7 +94,7 @@ relating to checksums.
typedef struct PageHeaderData
{
// LSN is member of *any* block, not only page-organized ones
- PageXLogRecPtr pd_lsn; /* LSN: next byte after last byte of xlog * record for last change to this page */
+ PageWalRecPtr pd_lsn; /* LSN: next byte after last byte of wal * record for last change to this page */
uint16 pd_checksum; /* checksum */
uint16 pd_flags; /* flag bits, see below */
uint16 pd_lower; /* offset to start of free space */
@@ -197,7 +197,7 @@ pageChecksumTest(const char *szPage, uint32 uiBlockNo, uint32 uiPageSize, uint32
// This is a new page so don't test checksum
((PageHeader)szPage)->pd_upper == 0 ||
// LSN is after the backup started so checksum is not tested because pages may be torn
- (((PageHeader)szPage)->pd_lsn.xlogid >= uiIgnoreWalId && ((PageHeader)szPage)->pd_lsn.xrecoff >= uiIgnoreWalOffset) ||
+ (((PageHeader)szPage)->pd_lsn.walid >= uiIgnoreWalId && ((PageHeader)szPage)->pd_lsn.xrecoff >= uiIgnoreWalOffset) ||
// Checksum is valid
((PageHeader)szPage)->pd_checksum == pageChecksum(szPage, uiBlockNo, uiPageSize);
}
diff --git a/test/expect/help-help-001.log b/test/expect/help-help-001.log
index c57b2d6fe..723d09b29 100644
--- a/test/expect/help-help-001.log
+++ b/test/expect/help-help-001.log
@@ -130,16 +130,16 @@ configured correctly for archiving and backups. It detects misconfigurations,
particularly in archiving, that result in incomplete backups because required
WAL segments did not reach the archive. The command can be run on the database
or the backup host. The command may also be run on the standby host, however,
-since pg_switch_xlog() cannot be performed on the standby, the command will
-only test the repository configuration.
+since pg_switch_xlog()/pg_switch_wal() cannot be performed on the standby, the
+command will only test the repository configuration.
Note that pg_create_restore_point('pgBackRest Archive Check') and
-pg_switch_xlog() are called to force PostgreSQL to archive a WAL segment.
-Restore points are only supported in PostgreSQL >= 9.1 so for older versions
-the check command may fail if there has been no write activity since the last
-log rotation, therefore it is recommended that activity be generated by the
-user if there have been no writes since the last xlog switch before running the
-check command.
+pg_switch_xlog()/pg_switch_wal() are called to force PostgreSQL to archive a
+WAL segment. Restore points are only supported in PostgreSQL >= 9.1 so for
+older versions the check command may fail if there has been no write activity
+since the last log rotation, therefore it is recommended that activity be
+generated by the user if there have been no writes since the last WAL switch
+before running the check command.
Command Options:
diff --git a/test/expect/mock-all-001.log b/test/expect/mock-all-001.log
index f5138c50f..a159429b6 100644
--- a/test/expect/mock-all-001.log
+++ b/test/expect/mock-all-001.log
@@ -106,12 +106,12 @@ P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^
P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Storage::Local->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/db-master/repo/backup/db/[BACKUP-FULL-1]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-FULL-1]
@@ -491,12 +491,12 @@ P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^
P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Storage::Local->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/db-master/repo/backup/db/[BACKUP-FULL-2]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-FULL-2]
@@ -658,12 +658,12 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Storage::Local->exists=>: bExists = true
P00 WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 WARN: aborted backup [BACKUP-FULL-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt
@@ -1566,11 +1566,11 @@ P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Storage::Local->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Manifest->build: found tablespace 1 in offline mode
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/db-master/repo/backup/db/[BACKUP-INCR-1]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-INCR-1]
@@ -1869,17 +1869,17 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Storage::Local->exists(): strFileExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Storage::Local->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Manifest->build: found tablespace 1 in offline mode
P00 DEBUG: Manifest->build: found tablespace 11 in offline mode
P00 DEBUG: Manifest->build: found tablespace 2 in offline mode
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/tablespace/ts1
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/11, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts11
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/11, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts11
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/tablespace/ts11
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/2, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts2
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/2, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts2
P00 DEBUG: Storage::Local->manifest(): strPathExp = [TEST_PATH]/db-master/db/tablespace/ts2
P00 WARN: aborted backup [BACKUP-INCR-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt
diff --git a/test/expect/mock-all-002.log b/test/expect/mock-all-002.log
index d83fb57c6..609264254 100644
--- a/test/expect/mock-all-002.log
+++ b/test/expect/mock-all-002.log
@@ -112,12 +112,12 @@ P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^
P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/backup/repo/backup/db/[BACKUP-FULL-1]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-FULL-1]
@@ -496,12 +496,12 @@ P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^
P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/backup/repo/backup/db/[BACKUP-FULL-2]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-FULL-2]
@@ -592,12 +592,12 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/backup/repo/backup/db/[BACKUP-FULL-2]/backup.manifest.copy
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 WARN: aborted backup [BACKUP-FULL-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 DEBUG: Backup::Backup->resumeClean(): oAbortedManifest = [object], oManifest = [object], oStorageRepo = [object], strBackupLabel = [BACKUP-FULL-2]
@@ -841,12 +841,12 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/backup/repo/backup/db/[BACKUP-FULL-2]/backup.manifest.copy
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 WARN: aborted backup [BACKUP-FULL-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 DEBUG: Backup::Backup->resumeClean(): oAbortedManifest = [object], oManifest = [object], oStorageRepo = [object], strBackupLabel = [BACKUP-FULL-2]
@@ -952,12 +952,12 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = true
P00 WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/pg_stat, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_stat
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_stat
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = false, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [undef], strLevel = pg_data/postgresql.conf, strParentPath = [TEST_PATH]/db-master/db/base, strPath = ../pg_config/postgresql.conf
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/pg_config/postgresql.conf
P00 WARN: aborted backup [BACKUP-FULL-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt
@@ -1676,11 +1676,11 @@ P00 DEBUG: Storage::Local->list=>: stryFileList = ()
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Manifest->build: found tablespace 1 in offline mode
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Backup::Backup->process: create backup path [TEST_PATH]/backup/repo/backup/db/[BACKUP-INCR-1]
P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = , bIgnoreExists = , strMode = <0750>, strPathExp = /[BACKUP-INCR-1]
@@ -2005,17 +2005,17 @@ P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [
P00 DEBUG: Protocol::Storage::Remote->exists(): strPathExp = [TEST_PATH]/db-master/db/base/postmaster.pid
P00 DEBUG: Protocol::Storage::Remote->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], hDatabaseMap = [undef], hTablespaceMap = [undef], oLastManifest = [object], oStorageDbMaster = [object], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db-master/db/base
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base/pg_tblspc
P00 DEBUG: Manifest->build: found tablespace 1 in offline mode
P00 DEBUG: Manifest->build: found tablespace 11 in offline mode
P00 DEBUG: Manifest->build: found tablespace 2 in offline mode
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/base
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/1, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts1
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/tablespace/ts1
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/11, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts11
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/11, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts11
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/tablespace/ts11
-P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strDbVersion = 9.4, strFilter = [TS_PATH-1], strLevel = pg_tblspc/2, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts2
+P00 DEBUG: Manifest->build(): bOnline = false, bTablespace = true, hDatabaseMap = [undef], hTablespaceMap = [hash], oLastManifest = [undef], oStorageDbMaster = [object], strFilter = [TS_PATH-1], strLevel = pg_tblspc/2, strParentPath = [TEST_PATH]/db-master/db/base/pg_tblspc/pg_tblspc/pg_tblspc, strPath = [TEST_PATH]/db-master/db/tablespace/ts2
P00 DEBUG: Protocol::Storage::Remote->manifest(): rhParam = [undef], strPathExp = [TEST_PATH]/db-master/db/tablespace/ts2
P00 WARN: aborted backup [BACKUP-INCR-2] of same type exists, will be cleaned to remove invalid files and resumed
P00 TEST: PgBaCkReStTeSt-BACKUP-RESUME-PgBaCkReStTeSt
diff --git a/test/lib/pgBackRestTest/Common/ContainerTest.pm b/test/lib/pgBackRestTest/Common/ContainerTest.pm
index ffb49801f..e5ae8a7c0 100755
--- a/test/lib/pgBackRestTest/Common/ContainerTest.pm
+++ b/test/lib/pgBackRestTest/Common/ContainerTest.pm
@@ -448,7 +448,8 @@ sub containerBuild
{
$strScript .=
" echo 'deb http://apt.postgresql.org/pub/repos/apt/ " .
- $$oVm{$strOS}{&VM_OS_REPO} . "-pgdg main' >> /etc/apt/sources.list.d/pgdg.list && \\\n" .
+ $$oVm{$strOS}{&VM_OS_REPO} . '-pgdg main' . ($strOS ne VM_U12 ? ' 10' : '') .
+ "' >> /etc/apt/sources.list.d/pgdg.list && \\\n" .
" wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \\\n" .
" apt-get update";
}
diff --git a/test/lib/pgBackRestTest/Common/VmTest.pm b/test/lib/pgBackRestTest/Common/VmTest.pm
index d9de814a0..5f6f66acc 100644
--- a/test/lib/pgBackRestTest/Common/VmTest.pm
+++ b/test/lib/pgBackRestTest/Common/VmTest.pm
@@ -166,6 +166,7 @@ my $oyVm =
PG_VERSION_83,
PG_VERSION_84,
PG_VERSION_92,
+ PG_VERSION_93,
],
},
@@ -197,8 +198,15 @@ my $oyVm =
&VM_DB =>
[
- PG_VERSION_93,
PG_VERSION_94,
+ PG_VERSION_95,
+ PG_VERSION_10,
+ ],
+
+ &VM_DB_TEST =>
+ [
+ PG_VERSION_94,
+ PG_VERSION_10,
],
},
};
diff --git a/test/lib/pgBackRestTest/Env/ExpireEnvTest.pm b/test/lib/pgBackRestTest/Env/ExpireEnvTest.pm
index 6d49746aa..2528e4521 100644
--- a/test/lib/pgBackRestTest/Env/ExpireEnvTest.pm
+++ b/test/lib/pgBackRestTest/Env/ExpireEnvTest.pm
@@ -265,7 +265,7 @@ sub backupCreate
&log(INFO, "create backup ${strBackupLabel}");
my $strManifestFile = "$$oStanza{strBackupClusterPath}/${strBackupLabel}/" . FILE_MANIFEST;
- my $oManifest = new pgBackRest::Manifest($strManifestFile, false);
+ my $oManifest = new pgBackRest::Manifest($strManifestFile, {bLoad => false, strDbVersion => PG_VERSION_93});
# Store information about the backup into the backup section
$oManifest->set(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_LABEL, undef, $strBackupLabel);
diff --git a/test/lib/pgBackRestTest/Env/Host/HostDbCommonTest.pm b/test/lib/pgBackRestTest/Env/Host/HostDbCommonTest.pm
index 42d40a9d6..7f31276f0 100644
--- a/test/lib/pgBackRestTest/Env/Host/HostDbCommonTest.pm
+++ b/test/lib/pgBackRestTest/Env/Host/HostDbCommonTest.pm
@@ -112,7 +112,7 @@ sub archivePush
my
(
$strOperation,
- $strXlogPath,
+ $strWalPath,
$strArchiveTestFile,
$iArchiveNo,
$iExpectedError,
@@ -121,7 +121,7 @@ sub archivePush
logDebugParam
(
__PACKAGE__ . '->archivePush', \@_,
- {name => 'strXlogPath'},
+ {name => 'strWalPath'},
{name => 'strArchiveTestFile', required => false},
{name => 'iArchiveNo', required => false},
{name => 'iExpectedError', required => false},
@@ -132,12 +132,12 @@ sub archivePush
if (defined($strArchiveTestFile))
{
- $strSourceFile = "${strXlogPath}/" . uc(sprintf('0000000100000001%08x', $iArchiveNo));
+ $strSourceFile = "${strWalPath}/" . uc(sprintf('0000000100000001%08x', $iArchiveNo));
storageTest()->copy($strArchiveTestFile, storageTest()->openWrite($strSourceFile, {bPathCreate => true}));
- storageTest()->pathCreate("${strXlogPath}/archive_status/", {bIgnoreExists => true, bCreateParent => true});
- storageTest()->put("${strXlogPath}/archive_status/" . uc(sprintf('0000000100000001%08x', $iArchiveNo)) . '.ready');
+ storageTest()->pathCreate("${strWalPath}/archive_status/", {bIgnoreExists => true, bCreateParent => true});
+ storageTest()->put("${strWalPath}/archive_status/" . uc(sprintf('0000000100000001%08x', $iArchiveNo)) . '.ready');
}
$self->executeSimple(
@@ -357,8 +357,7 @@ sub restore
my $oExpectedManifest = new pgBackRest::Manifest(
storageRepo()->pathGet(
STORAGE_REPO_BACKUP . qw{/} . ($strBackup eq 'latest' ? $oHostBackup->backupLast() : $strBackup) . qw{/} .
- FILE_MANIFEST),
- true);
+ FILE_MANIFEST));
$oExpectedManifestRef = $oExpectedManifest->{oContent};
@@ -470,15 +469,13 @@ sub restoreCompare
new pgBackRest::Manifest(
storageRepo()->pathGet(
STORAGE_REPO_BACKUP . qw{/} . ($strBackup eq 'latest' ? $oHostBackup->backupLast() : $strBackup) .
- '/'. FILE_MANIFEST),
- true);
+ '/'. FILE_MANIFEST));
$oLastManifest =
new pgBackRest::Manifest(
storageRepo()->pathGet(
STORAGE_REPO_BACKUP . qw{/} .
- ${$oExpectedManifestRef}{&MANIFEST_SECTION_BACKUP}{&MANIFEST_KEY_PRIOR} . qw{/} . FILE_MANIFEST),
- true);
+ ${$oExpectedManifestRef}{&MANIFEST_SECTION_BACKUP}{&MANIFEST_KEY_PRIOR} . qw{/} . FILE_MANIFEST));
}
# Generate the tablespace map for real backups
@@ -530,7 +527,9 @@ sub restoreCompare
}
}
- my $oActualManifest = new pgBackRest::Manifest("${strTestPath}/" . FILE_MANIFEST, false);
+ my $oActualManifest = new pgBackRest::Manifest(
+ "${strTestPath}/" . FILE_MANIFEST,
+ {bLoad => false, strDbVersion => $oExpectedManifestRef->{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION}});
$oActualManifest->set(
MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef,
@@ -539,9 +538,7 @@ sub restoreCompare
MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CATALOG, undef,
$$oExpectedManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG});
- $oActualManifest->build(
- storageTest(), ${$oExpectedManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION}, $strDbClusterPath,
- $oLastManifest, false, $oTablespaceMap);
+ $oActualManifest->build(storageTest(), $strDbClusterPath, $oLastManifest, false, $oTablespaceMap);
my $strSectionPath = $oActualManifest->get(MANIFEST_SECTION_BACKUP_TARGET, MANIFEST_TARGET_PGDATA, MANIFEST_SUBKEY_PATH);
@@ -700,10 +697,12 @@ sub restoreCompare
}
# Check that archive status exists in the manifest for an online backup
+ my $strArchiveStatusPath = MANIFEST_TARGET_PGDATA . qw{/} . $oActualManifest->walPath() . qw{/} . DB_PATH_ARCHIVESTATUS;
+
if ($oExpectedManifestRef->{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_ONLINE} &&
- !defined($oExpectedManifestRef->{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_PATH_PGXLOG_ARCHIVESTATUS}))
+ !defined($oExpectedManifestRef->{&MANIFEST_SECTION_TARGET_PATH}{$strArchiveStatusPath}))
{
- confess &log(ERROR, DB_PATH_PGXLOG_ARCHIVESTATUS . ' expected for online backup', ERROR_ASSERT);
+ confess &log(ERROR, "${strArchiveStatusPath} expected for online backup", ERROR_ASSERT);
}
# Delete the list of DBs
diff --git a/test/lib/pgBackRestTest/Env/Host/HostDbTest.pm b/test/lib/pgBackRestTest/Env/Host/HostDbTest.pm
index 786b13956..61d3375fe 100644
--- a/test/lib/pgBackRestTest/Env/Host/HostDbTest.pm
+++ b/test/lib/pgBackRestTest/Env/Host/HostDbTest.pm
@@ -92,7 +92,8 @@ sub new
my @stryVersionToken = split(/ /, $strOutLog);
@stryVersionToken = split(/\./, $stryVersionToken[2]);
- my $strDbVersionActual = $stryVersionToken[0] . '.' . trim($stryVersionToken[1]);
+ my $strDbVersionActual =
+ trim($stryVersionToken[0]) . (defined($stryVersionToken[1]) ? '.' . trim($stryVersionToken[1]) : '');
# Warn if this is a devel/alpha/beta version
my $strVersionRegExp = '(devel|((alpha|beta|rc)[0-9]+))$';
@@ -123,8 +124,8 @@ sub new
}
}
- # Create pg_xlog directory
- storageTest()->pathCreate($self->dbPath() . '/pg_xlog', {strMode => '0700'});
+ # Create wal directory
+ storageTest()->pathCreate($self->dbPath() . '/pg_' . $self->walId(), {strMode => '0700'});
# Return from function and log return values if any
return logDebugReturn
@@ -146,9 +147,10 @@ sub sqlConnect
my $iTimeout = defined($$hParam{iTimeout}) ? $$hParam{iTimeout} : HOST_DB_TIMEOUT;
my $strDb = defined($$hParam{strDb}) ? $$hParam{strDb} : HOST_DB_DEFAULT;
+ # If not connected
if (!defined($self->{db}{$strDb}{hDb}))
{
- # Setup the wait loop
+ # Retry until connection is successful
my $oWait = waitInit($iTimeout);
do
@@ -164,6 +166,7 @@ sub sqlConnect
}
while (!defined($self->{db}{$strDb}{hDb}) && waitMore($oWait));
+ # Error if unable to connect
if (!defined($self->{db}{$strDb}{hDb}))
{
confess &log(ERROR, "unable to connect to PostgreSQL after ${iTimeout} second(s):\n" . $DBI::errstr, ERROR_DB_CONNECT);
@@ -293,12 +296,15 @@ sub sqlSelectOneTest
do
{
+ $self->sqlConnect();
$strActualValue = $self->sqlSelectOne($strSql);
if (defined($strActualValue) && $strActualValue eq $strExpectedValue)
{
return;
}
+
+ $self->sqlDisconnect();
}
while (defined($iTimeout) && (time() - $lStartTime) <= $iTimeout);
@@ -321,13 +327,13 @@ sub sqlCommit
}
####################################################################################################################################
-# sqlXlogRotate
+# sqlWalRotate
####################################################################################################################################
-sub sqlXlogRotate
+sub sqlWalRotate
{
my $self = shift;
- $self->sqlExecute('select pg_switch_xlog()', {bCommit => false, bCheckPoint => false});
+ $self->sqlExecute('select pg_switch_' . $self->walId() . '()', {bCommit => false, bCheckPoint => false});
}
####################################################################################################################################
@@ -341,13 +347,13 @@ sub clusterCreate
my $hParam = shift;
# Set defaults
- my $strXlogPath = defined($$hParam{strXlogPath}) ? $$hParam{strXlogPath} : $self->dbPath() . '/pg_xlog';
+ my $strWalPath = defined($$hParam{strWalPath}) ? $$hParam{strWalPath} : $self->dbPath() . '/pg_' . $self->walId();
- # Don't link pg_xlog for versions < 9.2 because some recovery scenarios won't work.
+ # Don't link WAL directory for versions < 9.2 because some recovery scenarios won't work
$self->executeSimple(
$self->pgBinPath() . '/initdb ' .
($self->pgVersion() >= PG_VERSION_93 ? ' -k' : '') .
- ($self->pgVersion() >= PG_VERSION_92 ? " --xlogdir=${strXlogPath}" : '') .
+ ($self->pgVersion() >= PG_VERSION_92 ? ' --' . $self->walId() . "dir=${strWalPath}" : '') .
' --pgdata=' . $self->dbBasePath() . ' --auth=trust');
if (!$self->standby() && $self->pgVersion() >= PG_VERSION_HOT_STANDBY)
@@ -426,12 +432,7 @@ sub clusterStart
if ($self->pgVersion() >= PG_VERSION_90)
{
- $strCommand .= " -c wal_level=hot_standby";
-
- if ($bHotStandby)
- {
- $strCommand .= ' -c hot_standby=on';
- }
+ $strCommand .= ' -c wal_level=hot_standby -c hot_standby=' . ($bHotStandby ? 'on' : 'off');
}
$strCommand .=
@@ -502,6 +503,7 @@ sub clusterRestart
####################################################################################################################################
# Getters
####################################################################################################################################
+sub walId {return shift->pgVersion() >= PG_VERSION_10 ? 'wal' : 'xlog'}
sub pgBinPath {return testRunGet()->pgBinPath()}
sub pgLogFile {return shift->{strPgLogFile}}
sub pgLogPath {return shift->{strPgLogPath}}
diff --git a/test/lib/pgBackRestTest/Env/HostEnvTest.pm b/test/lib/pgBackRestTest/Env/HostEnvTest.pm
index 765c8f083..f1f5478d3 100644
--- a/test/lib/pgBackRestTest/Env/HostEnvTest.pm
+++ b/test/lib/pgBackRestTest/Env/HostEnvTest.pm
@@ -194,7 +194,7 @@ sub setup
sub archiveGenerate
{
my $self = shift;
- my $strXlogPath = shift;
+ my $strWalPath = shift;
my $iSourceNo = shift;
my $iArchiveNo = shift;
my $strWalVersion = shift;
@@ -204,7 +204,7 @@ sub archiveGenerate
(defined($bPartial) && $bPartial ? '.partial' : '');
my $strArchiveTestFile = $self->dataPath() . "/backup.wal${iSourceNo}_${strWalVersion}.bin";
- my $strSourceFile = "${strXlogPath}/${strArchiveFile}";
+ my $strSourceFile = "${strWalPath}/${strArchiveFile}";
storageTest()->copy($strArchiveTestFile, $strSourceFile);
diff --git a/test/lib/pgBackRestTest/Module/Archive/ArchiveCommonTest.pm b/test/lib/pgBackRestTest/Module/Archive/ArchiveCommonTest.pm
index a536e5822..56fe38336 100644
--- a/test/lib/pgBackRestTest/Module/Archive/ArchiveCommonTest.pm
+++ b/test/lib/pgBackRestTest/Module/Archive/ArchiveCommonTest.pm
@@ -33,13 +33,13 @@ sub run
if ($self->begin("${strModule}::walPath()"))
{
my $strDbPath = '/db';
- my $strWalFileRelative = 'pg_xlog/000000010000000100000001';
+ my $strWalFileRelative = 'pg_wal/000000010000000100000001';
my $strWalFileAbsolute = "${strDbPath}/${strWalFileRelative}";
#---------------------------------------------------------------------------------------------------------------------------
$self->testException(
sub {walPath($strWalFileRelative, undef, cfgCommandName(CFGCMD_ARCHIVE_GET))}, ERROR_OPTION_REQUIRED,
- "option 'db-path' must be specified when relative xlog paths are used\n" .
+ "option 'db-path' must be specified when relative wal paths are used\n" .
"HINT: Is \%f passed to " . cfgCommandName(CFGCMD_ARCHIVE_GET) . " instead of \%p?\n" .
"HINT: PostgreSQL may pass relative paths even with \%p depending on the environment.");
diff --git a/test/lib/pgBackRestTest/Module/Archive/ArchiveStopTest.pm b/test/lib/pgBackRestTest/Module/Archive/ArchiveStopTest.pm
index 2641be344..9e1a8fda8 100644
--- a/test/lib/pgBackRestTest/Module/Archive/ArchiveStopTest.pm
+++ b/test/lib/pgBackRestTest/Module/Archive/ArchiveStopTest.pm
@@ -58,9 +58,9 @@ sub run
# Create compression extension
my $strCompressExt = $bCompress ? qw{.} . COMPRESS_EXT : '';
- # Create the xlog path
- my $strXlogPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
- $oStorage->pathCreate($strXlogPath, {bCreateParent => true});
+ # Create the wal path
+ my $strWalPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
+ $oStorage->pathCreate($strWalPath, {bCreateParent => true});
# Create the test path for pg_control and copy pg_control for stanza-create
storageTest()->pathCreate($oHostDbMaster->dbBasePath() . '/' . DB_PATH_GLOBAL, {bCreateParent => true});
@@ -72,7 +72,7 @@ sub run
$oHostBackup->stanzaCreate('create required data for stanza', {strOptionalParam => '--no-' . cfgOptionName(CFGOPT_ONLINE)});
# Push a WAL segment
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile, 1);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile, 1);
# Break the database version of the archive info file
if ($iError == 0)
@@ -84,13 +84,13 @@ sub run
# Push two more segments with errors to exceed archive-max-mb
$oHostDbMaster->archivePush(
- $strXlogPath, $strArchiveTestFile, 2, $iError ? ERROR_FILE_READ : ERROR_ARCHIVE_MISMATCH);
+ $strWalPath, $strArchiveTestFile, 2, $iError ? ERROR_FILE_READ : ERROR_ARCHIVE_MISMATCH);
$oHostDbMaster->archivePush(
- $strXlogPath, $strArchiveTestFile, 3, $iError ? ERROR_FILE_READ : ERROR_ARCHIVE_MISMATCH);
+ $strWalPath, $strArchiveTestFile, 3, $iError ? ERROR_FILE_READ : ERROR_ARCHIVE_MISMATCH);
# Now this segment will get dropped
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile, 4);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile, 4);
# Fix the database version
if ($iError == 0)
@@ -107,7 +107,7 @@ sub run
'segment 2-4 not pushed (2 is pushed sometimes when remote but ignore)', {iWaitSeconds => 5});
#---------------------------------------------------------------------------------------------------------------------------
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile, 5);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile, 5);
$self->testResult(
sub {$oStorage->list(
diff --git a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm
index 97e7bec1a..50686bed3 100644
--- a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm
+++ b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm
@@ -106,9 +106,9 @@ sub run
$strLogDebug = '--' . cfgOptionName(CFGOPT_LOG_LEVEL_CONSOLE) . qw{=} . lc(WARN);
}
- # Create the xlog path
- my $strXlogPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
- storageTest()->pathCreate($strXlogPath, {bCreateParent => true});
+ # Create the wal path
+ my $strWalPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
+ storageTest()->pathCreate($strWalPath, {bCreateParent => true});
# Create the test path for pg_control
storageTest()->pathCreate($oHostDbMaster->dbBasePath() . '/' . DB_PATH_GLOBAL, {bCreateParent => true});
@@ -130,15 +130,15 @@ sub run
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' archive.info missing');
my $strSourceFile1 = $self->walSegment(1, 1, 1);
- storageTest()->pathCreate("${strXlogPath}/archive_status");
- my $strArchiveFile1 = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, $strSourceFile1);
+ storageTest()->pathCreate("${strWalPath}/archive_status");
+ my $strArchiveFile1 = $self->walGenerate($strWalPath, WAL_VERSION_94, 1, $strSourceFile1);
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile1}",
+ $strCommandPush . " ${strWalPath}/${strSourceFile1}",
{iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()});
$oHostDbMaster->executeSimple(
- $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",
{iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()});
#---------------------------------------------------------------------------------------------------------------------------
@@ -151,10 +151,10 @@ sub run
my @stryExpectedWAL;
my $strSourceFile = $self->walSegment(1, 1, 1);
- my $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 2, $strSourceFile);
+ my $strArchiveFile = $self->walGenerate($strWalPath, WAL_VERSION_94, 2, $strSourceFile);
$oHostDbMaster->executeSimple(
- $strCommandPush . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strLogDebug} ${strXlogPath}/${strSourceFile}",
+ $strCommandPush . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strLogDebug} ${strWalPath}/${strSourceFile}",
{oLogTest => $self->expect()});
push(@stryExpectedWAL, "${strSourceFile}-${strArchiveChecksum}");
@@ -165,16 +165,16 @@ sub run
&log(INFO, ' get first WAL');
# Remove WAL so it can be recovered
- storageTest()->remove("${strXlogPath}/${strSourceFile}", {bIgnoreMissing => false});
+ storageTest()->remove("${strWalPath}/${strSourceFile}", {bIgnoreMissing => false});
$oHostDbMaster->executeSimple(
- $strCommandGet . " ${strLogDebug} ${strSourceFile} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . " ${strLogDebug} ${strSourceFile} ${strWalPath}/RECOVERYXLOG",
{oLogTest => $self->expect()});
# Check that the destination file exists
- if (storageDb()->exists("${strXlogPath}/RECOVERYXLOG"))
+ if (storageDb()->exists("${strWalPath}/RECOVERYXLOG"))
{
- my ($strActualChecksum) = storageDb()->hashSize("${strXlogPath}/RECOVERYXLOG");
+ my ($strActualChecksum) = storageDb()->hashSize("${strWalPath}/RECOVERYXLOG");
if ($strActualChecksum ne $strArchiveChecksum)
{
@@ -183,7 +183,7 @@ sub run
}
else
{
- confess "archive file '${strXlogPath}/RECOVERYXLOG' is not in destination";
+ confess "archive file '${strWalPath}/RECOVERYXLOG' is not in destination";
}
#---------------------------------------------------------------------------------------------------------------------------
@@ -191,7 +191,7 @@ sub run
# Generate second WAL segment
$strSourceFile = $self->walSegment(1, 1, 2);
- $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 2, $strSourceFile);
+ $strArchiveFile = $self->walGenerate($strWalPath, WAL_VERSION_94, 2, $strSourceFile);
# Create a temp file to make sure it is deleted later (skip when S3 since it doesn't use temp files)
my $strArchiveTmp;
@@ -217,7 +217,7 @@ sub run
# Push the WAL
$oHostDbMaster->executeSimple(
- "${strCommandPush} --compress --archive-async --process-max=2 ${strXlogPath}/${strSourceFile}",
+ "${strCommandPush} --compress --archive-async --process-max=2 ${strWalPath}/${strSourceFile}",
{oLogTest => $self->expect()});
push(@stryExpectedWAL, "${strSourceFile}-${strArchiveChecksum}." . COMPRESS_EXT);
@@ -253,11 +253,11 @@ sub run
{&INFO_ARCHIVE_SECTION_DB => {&INFO_ARCHIVE_KEY_DB_VERSION => '8.0'}});
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}",
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()});
$oHostDbMaster->executeSimple(
- $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()});
#---------------------------------------------------------------------------------------------------------------------------
@@ -268,11 +268,11 @@ sub run
{&INFO_ARCHIVE_SECTION_DB => {&INFO_BACKUP_KEY_SYSTEM_ID => 5000900090001855000}});
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}",
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()});
$oHostDbMaster->executeSimple(
- $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()});
# Restore the file to its original condition
@@ -284,11 +284,11 @@ sub run
$oHostDbMaster->stop({strStanza => $oHostDbMaster->stanza()});
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}",
{iExpectedExitStatus => ERROR_STOP, oLogTest => $self->expect()});
$oHostDbMaster->executeSimple(
- $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG",
{iExpectedExitStatus => ERROR_STOP, oLogTest => $self->expect()});
$oHostDbMaster->start({strStanza => $oHostDbMaster->stanza()});
@@ -296,31 +296,31 @@ sub run
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' WAL duplicate ok');
- $oHostDbMaster->executeSimple($strCommandPush . " ${strXlogPath}/${strSourceFile}", {oLogTest => $self->expect()});
+ $oHostDbMaster->executeSimple($strCommandPush . " ${strWalPath}/${strSourceFile}", {oLogTest => $self->expect()});
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' WAL duplicate error');
- $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, $strSourceFile);
+ $strArchiveFile = $self->walGenerate($strWalPath, WAL_VERSION_94, 1, $strSourceFile);
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}",
{iExpectedExitStatus => ERROR_ARCHIVE_DUPLICATE, oLogTest => $self->expect()});
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' get second WAL');
# Remove WAL so it can be recovered
- storageTest()->remove("${strXlogPath}/${strSourceFile}", {bIgnoreMissing => false});
+ storageTest()->remove("${strWalPath}/${strSourceFile}", {bIgnoreMissing => false});
$oHostDbMaster->executeSimple(
- $strCommandGet . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strSourceFile} ${strXlogPath}/RECOVERYXLOG",
+ $strCommandGet . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strSourceFile} ${strWalPath}/RECOVERYXLOG",
{oLogTest => $self->expect()});
# Check that the destination file exists
- if (storageDb()->exists("${strXlogPath}/RECOVERYXLOG"))
+ if (storageDb()->exists("${strWalPath}/RECOVERYXLOG"))
{
- my ($strActualChecksum) = storageDb()->hashSize("${strXlogPath}/RECOVERYXLOG");
+ my ($strActualChecksum) = storageDb()->hashSize("${strWalPath}/RECOVERYXLOG");
if ($strActualChecksum ne $strArchiveChecksum)
{
@@ -329,15 +329,15 @@ sub run
}
else
{
- confess "archive file '${strXlogPath}/RECOVERYXLOG' is not in destination";
+ confess "archive file '${strWalPath}/RECOVERYXLOG' is not in destination";
}
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' .partial WAL');
- $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 2, "${strSourceFile}.partial");
+ $strArchiveFile = $self->walGenerate($strWalPath, WAL_VERSION_94, 2, "${strSourceFile}.partial");
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}.partial",
{oLogTest => $self->expect()});
$self->archiveCheck("${strSourceFile}.partial", $strArchiveChecksum, false);
@@ -347,16 +347,16 @@ sub run
&log(INFO, ' .partial WAL duplicate');
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial", {oLogTest => $self->expect()});
+ $strCommandPush . " ${strWalPath}/${strSourceFile}.partial", {oLogTest => $self->expect()});
$self->archiveCheck(
"${strSourceFile}.partial", $strArchiveChecksum, false);
#---------------------------------------------------------------------------------------------------------------------------
&log(INFO, ' .partial WAL with different checksum');
- $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, "${strSourceFile}.partial");
+ $strArchiveFile = $self->walGenerate($strWalPath, WAL_VERSION_94, 1, "${strSourceFile}.partial");
$oHostDbMaster->executeSimple(
- $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial",
+ $strCommandPush . " ${strWalPath}/${strSourceFile}.partial",
{iExpectedExitStatus => ERROR_ARCHIVE_DUPLICATE, oLogTest => $self->expect()});
#---------------------------------------------------------------------------------------------------------------------------
diff --git a/test/lib/pgBackRestTest/Module/Mock/MockStanzaTest.pm b/test/lib/pgBackRestTest/Module/Mock/MockStanzaTest.pm
index 0fc4d11db..f2316db14 100644
--- a/test/lib/pgBackRestTest/Module/Mock/MockStanzaTest.pm
+++ b/test/lib/pgBackRestTest/Module/Mock/MockStanzaTest.pm
@@ -80,14 +80,14 @@ sub run
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaUpgrade('already up to date', {strOptionalParam => '--no-' . cfgOptionName(CFGOPT_ONLINE)});
- # Create the xlog path
- my $strXlogPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
- storageDb()->pathCreate($strXlogPath, {bCreateParent => true});
+ # Create the wal path
+ my $strWalPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
+ storageDb()->pathCreate($strWalPath, {bCreateParent => true});
# Stanza Create fails - missing archive.info from non-empty archive dir
#--------------------------------------------------------------------------------------------------------------------------
# Generate WAL then push to get valid archive data in the archive directory
- my ($strArchiveFile, $strSourceFile) = $self->archiveGenerate($strXlogPath, 1, 1, WAL_VERSION_93);
+ my ($strArchiveFile, $strSourceFile) = $self->archiveGenerate($strWalPath, 1, 1, WAL_VERSION_93);
my $strCommand = $oHostDbMaster->backrestExe() . ' --config=' . $oHostDbMaster->backrestConfig() .
' --stanza=db archive-push';
$oHostDbMaster->executeSimple($strCommand . " ${strSourceFile}", {oLogTest => $self->expect()});
@@ -216,7 +216,7 @@ sub run
forceStorageMode(storageDb(), $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL, '600');
# Fail on attempt to push an archive
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1, ERROR_ARCHIVE_MISMATCH);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1, ERROR_ARCHIVE_MISMATCH);
# Perform a successful stanza upgrade noting additional history lines in info files for new version of the database
#--------------------------------------------------------------------------------------------------------------------------
@@ -226,7 +226,7 @@ sub run
# After stanza upgrade, make sure archives are pushed to the new db verion-id directory (9.4-2)
#--------------------------------------------------------------------------------------------------------------------------
# Push a WAL segment so have a valid file in the latest DB archive dir only
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1);
$self->testResult(
sub {storageRepo()->list(STORAGE_REPO_ARCHIVE . qw{/} . PG_VERSION_94 . '-2/0000000100000001')},
"000000010000000100000001-1e34fa1c833090d94b9bb14f2a8d3153dca6ea27." . COMPRESS_EXT,
@@ -291,7 +291,7 @@ sub run
# Push a WAL and create a backup in the new DB to confirm diff changed to full and info command displays the JSON correctly
#--------------------------------------------------------------------------------------------------------------------------
- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_95 . '.bin', 1);
+ $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile . WAL_VERSION_95 . '.bin', 1);
# Test backup is changed from type=DIFF to FULL (WARN message displayed)
my $oExecuteBackup = $oHostBackup->backupBegin('diff', 'diff changed to full backup',
diff --git a/test/lib/pgBackRestTest/Module/Real/RealAllTest.pm b/test/lib/pgBackRestTest/Module/Real/RealAllTest.pm
index 7fb6059d2..627a0488b 100644
--- a/test/lib/pgBackRestTest/Module/Real/RealAllTest.pm
+++ b/test/lib/pgBackRestTest/Module/Real/RealAllTest.pm
@@ -93,6 +93,9 @@ sub run
{bHostBackup => $bHostBackup, bStandby => $bHostStandby, strBackupDestination => $strBackupDestination,
bCompress => $bCompress, bArchiveAsync => false, bS3 => $bS3});
+ # Create a manifest with the pg version to get version-specific paths
+ my $oManifest = new pgBackRest::Manifest(BOGUS, {bLoad => false, strDbVersion => $self->pgVersion()});
+
# Only perform extra tests on certain runs to save time
my $bTestLocal = $self->runCurrent() == 1;
my $bTestExtra =
@@ -365,7 +368,7 @@ sub run
# Create the table where test messages will be stored
$oHostDbMaster->sqlExecute("create table test (message text not null)");
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
$oHostDbMaster->sqlExecute("insert into test values ('$strDefaultMessage')");
if ($bTestLocal)
@@ -404,17 +407,17 @@ sub run
# down enough to make it evident that the async process is working.
if ($bTestExtra && $bCompress && $strBackupDestination eq HOST_BACKUP)
{
- &log(INFO, ' multiple pg_switch_xlog() to exercise async archiving');
- $oHostDbMaster->sqlExecute("create table xlog_activity (id int)");
- $oHostDbMaster->sqlXlogRotate();
- $oHostDbMaster->sqlExecute("insert into xlog_activity values (1)");
- $oHostDbMaster->sqlXlogRotate();
- $oHostDbMaster->sqlExecute("insert into xlog_activity values (2)");
- $oHostDbMaster->sqlXlogRotate();
- $oHostDbMaster->sqlExecute("insert into xlog_activity values (3)");
- $oHostDbMaster->sqlXlogRotate();
- $oHostDbMaster->sqlExecute("insert into xlog_activity values (4)");
- $oHostDbMaster->sqlXlogRotate();
+ &log(INFO, ' multiple wal switches to exercise async archiving');
+ $oHostDbMaster->sqlExecute("create table wal_activity (id int)");
+ $oHostDbMaster->sqlWalRotate();
+ $oHostDbMaster->sqlExecute("insert into wal_activity values (1)");
+ $oHostDbMaster->sqlWalRotate();
+ $oHostDbMaster->sqlExecute("insert into wal_activity values (2)");
+ $oHostDbMaster->sqlWalRotate();
+ $oHostDbMaster->sqlExecute("insert into wal_activity values (3)");
+ $oHostDbMaster->sqlWalRotate();
+ $oHostDbMaster->sqlExecute("insert into wal_activity values (4)");
+ $oHostDbMaster->sqlWalRotate();
}
# Setup replica
@@ -439,7 +442,7 @@ sub run
if ($oHostDbStandby->pgVersion() >= PG_VERSION_92)
{
- $oHostDbStandby->linkRemap(DB_PATH_PGXLOG, $oHostDbStandby->dbPath() . '/' . DB_PATH_PGXLOG);
+ $oHostDbStandby->linkRemap($oManifest->walPath(), $oHostDbStandby->dbPath() . '/' . $oManifest->walPath());
}
$oHostDbStandby->restore(
@@ -523,7 +526,7 @@ sub run
# Setup the time target
#---------------------------------------------------------------------------------------------------------------------------
$oHostDbMaster->sqlExecute("update test set message = '$strTimeMessage'");
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
my $strTimeTarget = $oHostDbMaster->sqlSelectOne("select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ')");
&log(INFO, " time target is ${strTimeTarget}");
@@ -564,9 +567,9 @@ sub run
# Create a table in the tablespace
$oHostDbMaster->sqlExecute("create table test_remove (id int)");
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
$oHostDbMaster->sqlExecute("update test set message = '$strDefaultMessage'");
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
# Start a backup so the next backup has to restart it. This test is not required for PostgreSQL >= 9.6 since backups
# are run in non-exlusive mode.
@@ -592,7 +595,7 @@ sub run
# Drop a table
$oHostDbMaster->sqlExecute('drop table test_remove');
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
$oHostDbMaster->sqlExecute("update test set message = '$strIncrMessage'", {bCommit => true});
# Check that application name is set
@@ -619,7 +622,7 @@ sub run
if ($bTestLocal)
{
$oHostDbMaster->sqlExecute("update test set message = '$strXidMessage'", {bCommit => false});
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
$strXidTarget = $oHostDbMaster->sqlSelectOne("select txid_current()");
$oHostDbMaster->sqlCommit();
&log(INFO, " xid target is ${strXidTarget}");
@@ -632,7 +635,7 @@ sub run
if ($bTestLocal)
{
$oHostDbMaster->sqlExecute("update test set message = '$strNameMessage'", {bCommit => true});
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
if ($oHostDbMaster->pgVersion() >= PG_VERSION_91)
{
@@ -652,7 +655,7 @@ sub run
'create table test_ts1 (id int) tablespace ts1;' .
'insert into test_ts1 values (2);',
{strDb => 'test2', bAutoCommit => true});
- $oHostDbMaster->sqlXlogRotate();
+ $oHostDbMaster->sqlWalRotate();
}
# Restore (type = default)
@@ -695,8 +698,8 @@ sub run
# Drop and recreate db path
testPathRemove($oHostDbMaster->dbBasePath());
storageTest()->pathCreate($oHostDbMaster->dbBasePath(), {strMode => '0700'});
- testPathRemove($oHostDbMaster->dbPath() . '/pg_xlog');
- storageTest()->pathCreate($oHostDbMaster->dbPath() . '/pg_xlog', {strMode => '0700'});
+ testPathRemove($oHostDbMaster->dbPath() . qw{/} . $oManifest->walPath());
+ storageTest()->pathCreate($oHostDbMaster->dbPath() . qw{/} . $oManifest->walPath(), {strMode => '0700'});
testPathRemove($oHostDbMaster->tablespacePath(1));
storageTest()->pathCreate($oHostDbMaster->tablespacePath(1), {strMode => '0700'});
@@ -821,7 +824,7 @@ sub run
$oHostDbMaster->clusterStop();
executeTest('rm -rf ' . $oHostDbMaster->dbBasePath() . "/*");
- executeTest('rm -rf ' . $oHostDbMaster->dbPath() . "/pg_xlog/*");
+ executeTest('rm -rf ' . $oHostDbMaster->dbPath() . qw{/} . $oManifest->walPath() . '/*');
$oHostDbMaster->restore(
$strIncrBackup, undef, undef, $bDelta, $bForce, $strType, $strTarget, $bTargetExclusive, $strTargetAction,
@@ -858,7 +861,7 @@ sub run
$oHostDbMaster->clusterStop();
executeTest('rm -rf ' . $oHostDbMaster->dbBasePath() . "/*");
- executeTest('rm -rf ' . $oHostDbMaster->dbPath() . "/pg_xlog/*");
+ executeTest('rm -rf ' . $oHostDbMaster->dbPath() . qw{/} . $oManifest->walPath() . '/*');
executeTest('rm -rf ' . $oHostDbMaster->tablespacePath(1) . "/*");
# Restore recovery file that was saved in last test