1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-05-27 22:37:55 +02:00

PostgreSQL 11 Beta 1 support.

This commit is contained in:
David Steele 2018-06-05 08:59:17 -04:00
parent e57840d739
commit d309a85b51
9 changed files with 31 additions and 4 deletions

View File

@ -14,6 +14,12 @@
<release-list>
<release date="XXXX-XX-XX" version="2.04dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-feature-list>
<release-item>
<p><postgres/> 11 Beta 1 support.</p>
</release-item>
</release-feature-list>
<release-development-list>
<release-item>
<p>Split log levels into separate header file. Many modules that use <code>debug.h</code> do not need to do logging so this reduces dependencies for those modules.</p>

View File

@ -67,6 +67,7 @@ my $oWalMagicHash =
hex('0xD087') => PG_VERSION_95,
hex('0xD093') => PG_VERSION_96,
hex('0xD097') => PG_VERSION_10,
hex('0xD098') => PG_VERSION_11,
};
####################################################################################################################################

View File

@ -63,6 +63,10 @@ my $oPgControlVersionHash =
{
201707211 => PG_VERSION_10,
},
1100 =>
{
201804191 => PG_VERSION_11,
},
};
####################################################################################################################################

View File

@ -47,6 +47,8 @@ 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_11 => '11';
push @EXPORT, qw(PG_VERSION_11);
use constant PG_VERSION_APPLICATION_NAME => PG_VERSION_90;
push @EXPORT, qw(PG_VERSION_APPLICATION_NAME);
@ -66,7 +68,7 @@ sub versionSupport
my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');
my @strySupportVersion = (PG_VERSION_83, PG_VERSION_84, PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93,
PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10);
PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10, PG_VERSION_11);
# Return from function and log return values if any
return logDebugReturn

View File

@ -142,6 +142,7 @@ static const EmbeddedModule embeddedModule[] =
"hex('0xD087') => PG_VERSION_95,\n"
"hex('0xD093') => PG_VERSION_96,\n"
"hex('0xD097') => PG_VERSION_10,\n"
"hex('0xD098') => PG_VERSION_11,\n"
"};\n"
"\n"
"\n"
@ -10377,6 +10378,10 @@ static const EmbeddedModule embeddedModule[] =
"{\n"
"201707211 => PG_VERSION_10,\n"
"},\n"
"1100 =>\n"
"{\n"
"201804191 => PG_VERSION_11,\n"
"},\n"
"};\n"
"\n"
"\n"
@ -11537,6 +11542,8 @@ static const EmbeddedModule embeddedModule[] =
"push @EXPORT, qw(PG_VERSION_96);\n"
"use constant PG_VERSION_10 => '10';\n"
"push @EXPORT, qw(PG_VERSION_10);\n"
"use constant PG_VERSION_11 => '11';\n"
"push @EXPORT, qw(PG_VERSION_11);\n"
"\n"
"use constant PG_VERSION_APPLICATION_NAME => PG_VERSION_90;\n"
"push @EXPORT, qw(PG_VERSION_APPLICATION_NAME);\n"
@ -11556,7 +11563,7 @@ static const EmbeddedModule embeddedModule[] =
"my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');\n"
"\n"
"my @strySupportVersion = (PG_VERSION_83, PG_VERSION_84, PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93,\n"
"PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10);\n"
"PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10, PG_VERSION_11);\n"
"\n"
"\n"
"return logDebugReturn\n"

View File

@ -22,7 +22,9 @@ pgVersionMap(uint32_t controlVersion, uint32_t catalogVersion)
uint result = 0;
if (controlVersion == 1002 && catalogVersion == 201707211)
if (controlVersion == 1100 && catalogVersion == 201804191)
result = PG_VERSION_11;
else if (controlVersion == 1002 && catalogVersion == 201707211)
result = PG_VERSION_10;
else if (controlVersion == 960 && catalogVersion == 201608131)
result = PG_VERSION_96;

View File

@ -466,7 +466,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 ? ' 11' : '') .
"' >> /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";
}

View File

@ -243,12 +243,14 @@ my $oyVm =
PG_VERSION_94,
PG_VERSION_95,
PG_VERSION_10,
PG_VERSION_11,
],
&VM_DB_TEST =>
[
PG_VERSION_94,
PG_VERSION_10,
PG_VERSION_11,
],
},
};

View File

@ -25,6 +25,7 @@ testRun()
TEST_RESULT_INT(pgVersionMap( 942, 201510051), PG_VERSION_95, " check version 9.5");
TEST_RESULT_INT(pgVersionMap( 960, 201608131), PG_VERSION_96, " check version 9.6");
TEST_RESULT_INT(pgVersionMap(1002, 201707211), PG_VERSION_10, " check version 10");
TEST_RESULT_INT(pgVersionMap(1100, 201804191), PG_VERSION_11, " check version 11");
// -------------------------------------------------------------------------------------------------------------------------
#define MAP_ERROR \
@ -40,6 +41,7 @@ testRun()
TEST_ERROR_FMT(pgVersionMap( 942, 0), VersionNotSupportedError, MAP_ERROR, 942);
TEST_ERROR_FMT(pgVersionMap( 960, 0), VersionNotSupportedError, MAP_ERROR, 960);
TEST_ERROR_FMT(pgVersionMap(1002, 0), VersionNotSupportedError, MAP_ERROR, 1002);
TEST_ERROR_FMT(pgVersionMap(1100, 0), VersionNotSupportedError, MAP_ERROR, 1100);
}
// -----------------------------------------------------------------------------------------------------------------------------