mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
77c721eb63
Our new policy is to support ten versions of PostgreSQL, the five supported releases and the last five EOL releases. As of PostgreSQL 15, that means 9.0/9.1/9.2 are no longer supported by pgBackRest. Remove all logic associated with 9.0/9.1/9.2 and update the tests. Document the new support policy. Update InfoPg to read/write control versions for the history in backup.info, since we can no longer rely on the mappings being available. In theory this could have been an issue after removing 8.3/8.4 if anybody was using a version that old.
63 lines
2.8 KiB
Perl
63 lines
2.8 KiB
Perl
####################################################################################################################################
|
|
# DB VERSION MODULE
|
|
####################################################################################################################################
|
|
package pgBackRestTest::Common::DbVersion;
|
|
|
|
use strict;
|
|
use warnings FATAL => qw(all);
|
|
use Carp qw(confess);
|
|
|
|
use Exporter qw(import);
|
|
our @EXPORT = qw();
|
|
|
|
use pgBackRestDoc::Common::Log;
|
|
|
|
####################################################################################################################################
|
|
# PostgreSQL version numbers
|
|
####################################################################################################################################
|
|
use constant PG_VERSION_93 => '9.3';
|
|
push @EXPORT, qw(PG_VERSION_93);
|
|
use constant PG_VERSION_94 => '9.4';
|
|
push @EXPORT, qw(PG_VERSION_94);
|
|
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_11 => '11';
|
|
push @EXPORT, qw(PG_VERSION_11);
|
|
use constant PG_VERSION_12 => '12';
|
|
push @EXPORT, qw(PG_VERSION_12);
|
|
use constant PG_VERSION_13 => '13';
|
|
push @EXPORT, qw(PG_VERSION_13);
|
|
use constant PG_VERSION_14 => '14';
|
|
push @EXPORT, qw(PG_VERSION_14);
|
|
use constant PG_VERSION_15 => '15';
|
|
push @EXPORT, qw(PG_VERSION_15);
|
|
|
|
####################################################################################################################################
|
|
# versionSupport
|
|
#
|
|
# Returns an array of the supported Postgres versions.
|
|
####################################################################################################################################
|
|
sub versionSupport
|
|
{
|
|
# Assign function parameters, defaults, and log debug info
|
|
my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');
|
|
|
|
my @strySupportVersion = (PG_VERSION_93, PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10, PG_VERSION_11,
|
|
PG_VERSION_12, PG_VERSION_13, PG_VERSION_14, PG_VERSION_15);
|
|
|
|
# Return from function and log return values if any
|
|
return logDebugReturn
|
|
(
|
|
$strOperation,
|
|
{name => 'strySupportVersion', value => \@strySupportVersion}
|
|
);
|
|
}
|
|
|
|
push @EXPORT, qw(versionSupport);
|
|
|
|
1;
|