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. * 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 ### 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 * 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> <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> <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>
<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-feature-bullet-list>
</release-version> </release-version>

View File

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

View File

@ -90,7 +90,7 @@ sub is_remote
#################################################################################################################################### ####################################################################################################################################
sub versionSupport 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; return \@strySupportVersion;
} }
@ -216,14 +216,15 @@ sub info
close($hFile); close($hFile);
# Make sure the control version is supported # Make sure the control version is supported
if ($iControlVersion == 942 && $iCatalogVersion == 201505311)
{
$strDbVersion = '9.5';
}
if ($iControlVersion == 942 && $iCatalogVersion == 201409291) if ($iControlVersion == 942 && $iCatalogVersion == 201409291)
{ {
$strDbVersion = '9.4'; $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) elsif ($iControlVersion == 937 && $iCatalogVersion == 201306121)
{ {
$strDbVersion = '9.3'; $strDbVersion = '9.3';

View File

@ -787,7 +787,13 @@ sub BackRestTestCommon_Setup
# Get the Postgres version # Get the Postgres version
my @stryVersionToken = split(/ /, $strOutLog); my @stryVersionToken = split(/ /, $strOutLog);
@stryVersionToken = split(/\./, $stryVersionToken[2]); @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 # Don't run unit tests for unsupported versions
my $strVersionSupport = versionSupport(); my $strVersionSupport = versionSupport();
@ -796,6 +802,14 @@ sub BackRestTestCommon_Setup
{ {
confess "currently only version ${$strVersionSupport}[0] and up are supported"; 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,8 +252,8 @@ eval
{ {
do do
{ {
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce); if (BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce))
{
&log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n"); &log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n");
if ($bInfinite) if ($bInfinite)
@ -285,7 +285,8 @@ eval
{ {
for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++) for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++)
{ {
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx], $iModuleTestRun, $bDryRun, $bNoCleanup); BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx],
$iModuleTestRun, $bDryRun, $bNoCleanup);
&log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n"); &log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n");
BackRestTestBackup_Test('full', $iThreadMax); BackRestTestBackup_Test('full', $iThreadMax);
} }
@ -297,6 +298,7 @@ eval
BackRestTestCompare_Test($strModuleTest); BackRestTestCompare_Test($strModuleTest);
} }
} }
}
while ($bInfinite); while ($bInfinite);
}; };