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

Experimental 9.5 support. Unit tests are not working yet.

This commit is contained in:
David Steele 2015-06-14 10:12:36 -04:00
parent 0b6f81a812
commit b865070edd
6 changed files with 70 additions and 43 deletions

View File

@ -774,6 +774,8 @@ example: db-path=/data/db
* Logging now uses unbuffered output. This should make log files that are being written by multiple threads less chaotic. Suggested by Michael Renner.
* Experimental support for PostgreSQL 9.5. This may break when the control version or WAL magic changes but will be kept as up to date as possible in each release.
### v0.70: Stability improvements for archiving, improved logging and help
* Fixed an issue where archive-copy would fail on an incr/diff backup when hardlink=n. In this case the pg_xlog path does not already exist and must be created. Reported by Michael Renner

View File

@ -732,6 +732,9 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<release-feature>
<text>Logging now uses unbuffered output. This should make log files that are being written by multiple threads less chaotic. Suggested by Michael Renner.</text>
</release-feature>
<release-feature>
<text>Experimental support for <postgres/> 9.5. This may break when the control version or WAL magic changes but will be updated in each release.</text>
</release-feature>
</release-feature-bullet-list>
</release-version>

View File

@ -176,7 +176,12 @@ sub walInfo
my $strDbVersion;
my $iSysIdOffset;
if ($iMagic == hex('0xD07E'))
if ($iMagic == hex('0xD085'))
{
$strDbVersion = '9.5';
$iSysIdOffset = 20;
}
elsif ($iMagic == hex('0xD07E'))
{
$strDbVersion = '9.4';
$iSysIdOffset = 20;

View File

@ -90,7 +90,7 @@ sub is_remote
####################################################################################################################################
sub versionSupport
{
my @strySupportVersion = ('8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4');
my @strySupportVersion = ('8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5');
return \@strySupportVersion;
}
@ -216,14 +216,15 @@ sub info
close($hFile);
# Make sure the control version is supported
if ($iControlVersion == 942 && $iCatalogVersion == 201505311)
{
$strDbVersion = '9.5';
}
if ($iControlVersion == 942 && $iCatalogVersion == 201409291)
{
$strDbVersion = '9.4';
}
# Leave 9.5 catalog version out until it stabilizes (then move 9.5 to the top of if list)
elsif ($iControlVersion == 942) # && $iCatalogVersion == 201505311)
{
$strDbVersion = '9.5';
}
elsif ($iControlVersion == 937 && $iCatalogVersion == 201306121)
{
$strDbVersion = '9.3';

View File

@ -787,7 +787,13 @@ sub BackRestTestCommon_Setup
# Get the Postgres version
my @stryVersionToken = split(/ /, $strOutLog);
@stryVersionToken = split(/\./, $stryVersionToken[2]);
$strCommonDbVersion = $stryVersionToken[0] . '.' . $stryVersionToken[1];
$strCommonDbVersion = $stryVersionToken[0] . '.' . trim($stryVersionToken[1]);
if ($strCommonDbVersion =~ /devel$/)
{
$strCommonDbVersion =~ s/devel$//;
&log(INFO, "Testing against ${strCommonDbVersion} development version");
}
# Don't run unit tests for unsupported versions
my $strVersionSupport = versionSupport();
@ -796,6 +802,14 @@ sub BackRestTestCommon_Setup
{
confess "currently only version ${$strVersionSupport}[0] and up are supported";
}
if ($strCommonDbVersion eq '9.5')
{
&log(WARN, "unit tests do not currently work with version 9.5");
return false;
}
return true;
}
####################################################################################################################################

View File

@ -252,49 +252,51 @@ eval
{
do
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce);
&log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n");
if ($bInfinite)
if (BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce))
{
$iRun++;
&log(INFO, "INFINITE - RUN ${iRun}\n");
}
&log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n");
if ($strModule eq 'all' || $strModule eq 'utility')
{
BackRestTestUtility_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'config')
{
BackRestTestConfig_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'file')
{
BackRestTestFile_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'backup')
{
BackRestTestBackup_Test($strModuleTest, $iThreadMax);
if (@stryTestVersion > 1 && ($strModuleTest eq 'all' || $strModuleTest eq 'full'))
if ($bInfinite)
{
for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++)
$iRun++;
&log(INFO, "INFINITE - RUN ${iRun}\n");
}
if ($strModule eq 'all' || $strModule eq 'utility')
{
BackRestTestUtility_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'config')
{
BackRestTestConfig_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'file')
{
BackRestTestFile_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'backup')
{
BackRestTestBackup_Test($strModuleTest, $iThreadMax);
if (@stryTestVersion > 1 && ($strModuleTest eq 'all' || $strModuleTest eq 'full'))
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx], $iModuleTestRun, $bDryRun, $bNoCleanup);
&log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n");
BackRestTestBackup_Test('full', $iThreadMax);
for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++)
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx],
$iModuleTestRun, $bDryRun, $bNoCleanup);
&log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n");
BackRestTestBackup_Test('full', $iThreadMax);
}
}
}
}
if ($strModule eq 'compare')
{
BackRestTestCompare_Test($strModuleTest);
if ($strModule eq 'compare')
{
BackRestTestCompare_Test($strModuleTest);
}
}
}
while ($bInfinite);