Bump minimum Perl version to 5.14

The oldest vendor-shipped Perl in the buildfarm is 5.14.2, which is
the last version that Debian Wheezy shipped. That OS is EOL, but we
keep it running because there is no other convenient way to test certain
non-mainstream 32-bit platforms. There is no bugfix in the 5.14.2 release
that is required, and yet it's also not the latest minor release --
that would be 5.14.4. To clarify the situation, we have thus arranged the
buildfarm to test 5.14.0. That allows configure scripts and documentation
to state 5.14 without fine print.

The MSVC build didn't check the version, since our previous minimum 5.8.3
was considered too old to check for on Windows. We will need a check for
Windows sometime during the v16 cycle, but that could be rendered moot
by the impending Meson conversion, so it seems safe to just document
the requirement for now.

Reviewed by Tom Lane
Discussion: https://www.postgresql.org/message-id/20220902181553.ev4pgzhubhdkguuv@awork3.anarazel.de
This commit is contained in:
John Naylor 2022-09-14 09:58:13 +07:00
parent ecaf7c5df5
commit 4c1532763a
9 changed files with 12 additions and 19 deletions

View File

@ -11,11 +11,11 @@ if test "$PERL"; then
pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']` pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']`
AC_MSG_NOTICE([using perl $pgac_perl_version]) AC_MSG_NOTICE([using perl $pgac_perl_version])
if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \ if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \
$AWK '{ if ([$]1 == 5 && ([$]2 > 8 || ($[2] == 8 && [$]3 >= 3))) exit 1; else exit 0;}' $AWK '{ if ([$]1 == 5 && ([$]2 >= 14)) exit 1; else exit 0;}'
then then
AC_MSG_WARN([ AC_MSG_WARN([
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL. *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
*** Perl version 5.8.3 or later is required, but this is $pgac_perl_version.]) *** Perl version 5.14 or later is required, but this is $pgac_perl_version.])
PERL="" PERL=""
fi fi
fi fi

6
configure vendored
View File

@ -10491,14 +10491,14 @@ if test "$PERL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
$as_echo "$as_me: using perl $pgac_perl_version" >&6;} $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \ if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
$AWK '{ if ($1 == 5 && ($2 > 8 || ($2 == 8 && $3 >= 3))) exit 1; else exit 0;}' $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL. *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
*** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&5 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
$as_echo "$as_me: WARNING: $as_echo "$as_me: WARNING:
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL. *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
*** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&2;} *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
PERL="" PERL=""
fi fi
fi fi

View File

@ -190,7 +190,7 @@ $ENV{MSBFLAGS}="/m";
or Cygwin Perl will not work. It must also be present in the PATH. or Cygwin Perl will not work. It must also be present in the PATH.
Binaries can be downloaded from Binaries can be downloaded from
<ulink url="https://www.activestate.com"></ulink> <ulink url="https://www.activestate.com"></ulink>
(Note: version 5.8.3 or later is required, (Note: version 5.14 or later is required,
the free Standard Distribution is sufficient). the free Standard Distribution is sufficient).
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -165,7 +165,7 @@ su - postgres
<application>PL/Perl</application> you need a full <application>PL/Perl</application> you need a full
<productname>Perl</productname> installation, including the <productname>Perl</productname> installation, including the
<filename>libperl</filename> library and the header files. <filename>libperl</filename> library and the header files.
The minimum required version is <productname>Perl</productname> 5.8.3. The minimum required version is <productname>Perl</productname> 5.14.
Since <application>PL/Perl</application> will be a shared Since <application>PL/Perl</application> will be a shared
library, the <indexterm><primary>libperl</primary></indexterm> library, the <indexterm><primary>libperl</primary></indexterm>
<filename>libperl</filename> library must be a shared library <filename>libperl</filename> library must be a shared library
@ -325,7 +325,7 @@ su - postgres
<primary>perl</primary> <primary>perl</primary>
</indexterm> </indexterm>
<application>Perl</application> 5.8.3 or later is needed to build from a Git checkout, <application>Perl</application> 5.14 or later is needed to build from a Git checkout,
or if you changed the input files for any of the build steps that or if you changed the input files for any of the build steps that
use Perl scripts. If building on Windows you will need use Perl scripts. If building on Windows you will need
<application>Perl</application> in any case. <application>Perl</application> is <application>Perl</application> in any case. <application>Perl</application> is

View File

@ -6,7 +6,6 @@
use strict; use strict;
use warnings; use warnings;
use 5.008001;
use vars qw(%_SHARED $_TD); use vars qw(%_SHARED $_TD);
PostgreSQL::InServer::Util::bootstrap(); PostgreSQL::InServer::Util::bootstrap();

View File

@ -2780,7 +2780,7 @@ all values '' if not found. Does not differentiate between null and empty string
for fields, no field is ever undef. for fields, no field is ever undef.
The restart_lsn and confirmed_flush_lsn fields are returned verbatim, and also The restart_lsn and confirmed_flush_lsn fields are returned verbatim, and also
as a 2-list of [highword, lowword] integer. Since we rely on Perl 5.8.8 we can't as a 2-list of [highword, lowword] integer. Since we rely on Perl 5.14 we can't
"use bigint", it's from 5.20, and we can't assume we have Math::Bigint from CPAN "use bigint", it's from 5.20, and we can't assume we have Math::Bigint from CPAN
either. either.

View File

@ -78,10 +78,6 @@ Each test script should end with:
done_testing(); done_testing();
Test::More::like entails use of the qr// operator. Avoid Perl 5.8.8 bug
#39185 by not using the "$" regular expression metacharacter in qr// when also
using the "/m" modifier. Instead of "$", use "\n" or "(?=\n|\z)".
Test::Builder::Level controls how far up in the call stack a test will look Test::Builder::Level controls how far up in the call stack a test will look
at when reporting a failure. This should be incremented by any subroutine at when reporting a failure. This should be incremented by any subroutine
which directly or indirectly calls test routines from Test::More, such as which directly or indirectly calls test routines from Test::More, such as
@ -103,7 +99,7 @@ Portability
----------- -----------
Avoid using any bleeding-edge Perl features. We have buildfarm animals Avoid using any bleeding-edge Perl features. We have buildfarm animals
running Perl versions as old as 5.8.3, so your tests will be expected running Perl versions as old as 5.14, so your tests will be expected
to pass on that. to pass on that.
Also, do not use any non-core Perl modules except IPC::Run. Or, if you Also, do not use any non-core Perl modules except IPC::Run. Or, if you
@ -116,8 +112,8 @@ One way to test for compatibility with old Perl versions is to use
perlbrew; see http://perlbrew.pl . After installing that, do perlbrew; see http://perlbrew.pl . After installing that, do
export PERLBREW_CONFIGURE_FLAGS='-de -Duseshrplib' export PERLBREW_CONFIGURE_FLAGS='-de -Duseshrplib'
perlbrew --force install 5.8.3 perlbrew --force install 5.14.0
perlbrew use 5.8.3 perlbrew use 5.14.0
perlbrew install-cpanm perlbrew install-cpanm
cpanm install Test::Simple@0.98 cpanm install Test::Simple@0.98
cpanm install IPC::Run@0.79 cpanm install IPC::Run@0.79

View File

@ -3,7 +3,6 @@
use strict; use strict;
use warnings; use warnings;
use 5.8.0;
use List::Util qw(max); use List::Util qw(max);
my @def; my @def;

View File

@ -4,7 +4,6 @@
use strict; use strict;
use warnings; use warnings;
use 5.008001;
use Cwd qw(abs_path getcwd); use Cwd qw(abs_path getcwd);
use File::Find; use File::Find;