Re: PL_stashcache, or, what's our minimum Perl version?

From: "Tels" <nospam-pg-abuse(at)bloodgate(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL_stashcache, or, what's our minimum Perl version?
Date: 2017-07-30 08:48:18
Message-ID: 48949fdf4e0df05fca589016e0d8d9cc.squirrel@sm.webmail.pair.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Moin Tom,

On Sun, July 30, 2017 1:21 am, Tom Lane wrote:
> I wrote:
>> So the question is, does anyone care? I wouldn't except that our
>> documentation appears to claim that we work with Perl "5.8 or later".
>> And the lack of field complaints suggests strongly that nobody else
>> cares. So I'm inclined to think we just need to be more specific
>> about the minimum Perl version --- but what exactly?

My 0.02 cent on Perl versions:

Not sure how often People use old Perl versions out in the field. I'd
venture this is either happens with "ancient" stuff, e.g. where people
just can't or want upgrade.

Otherwise, an up-to-date OS is just necessary for security, anyway, and
that would contain a Perl from this decade, wouldn't it?

If someone is still running Perl 5.8.3, they also got glorius Unicode
circa Unicode 4.0 or in this area...

> I've done some more research on this. It seems to me there are four
> distinct components to any claim about whether we work with a particular
> Perl version:
>
> 1. Can it run the build-related Perl scripts needed to build PG from
> a bare git checkout, on non-Windows platforms?
> 2. Can it run our MSVC build scripts?
> 3. Does pl/perl compile (and pass its regression tests) against it?
> 4. Can it run our TAP tests?
>
> I have no info to offer about point #2, but I did some tests with
> ancient 5.8.x Perl versions on my buildfarm hosts prairiedog and
> gaur. (I would have liked to use something faster, but these Perl
> versions failed to build at all on more recent platforms, and
> I thought it rather pointless to try to hack them enough to build.)
>
> I find that perl 5.8.0 and later seem to succeed at point #1,
> but you need at least 5.8.1 to compile plperl. Also, on prairiedog
> 5.8.1 fails plperl's regression tests because of some seemingly
> utf8-related bug. That may be an ancient-macOS problem more than
> anything else, so I didn't poke at it too hard.
>
> The really surprising thing I found out is that you can't run the
> TAP tests on anything older than 5.8.3, because that's when they
> added "prove". I'm bemused by the idea that such a fundamental
> facility would get added in a third-digit minor release, but there
> you have it. (Now, in fairness, this amounted to importing a feature
> that already existed on CPAN, but still...)
>
> 5.8.3 does appear to succeed at points 1,3,4. Now, to get through
> the TAP tests you need to install IPC::Run, and you also need to
> update Test::More because the version shipped with 5.8.3 is too old.
> But at least the failures that you get from lacking these are pretty
> clear.
>
> I am unable to confirm our claim that we work with Test::More 0.82,
> because CPAN has only versions from a year or three back. (Anyone
> know of a more, er, comprehensive archive than CPAN?) It's also
> interesting to speculate about how old a version of IPC::Run is new
> enough, but I see no easy way to get much data on that either.
>
> Anyway, pending some news about compatibility of the MSVC scripts,
> I think we ought to adjust our docs to state that 5.8.3 is the
> minimum supported Perl version.
>
> Also, I got seriously confused at one point during these tests because,
> while our configure script carefully sets PERL to an absolute path name,
> it's content to set PROVE to "prove", paying no attention to whether
> that version of "prove" matches "perl". Is it really okay to run the
> TAP tests with a different perl version than we selected for other
> purposes? I think it'd be a good idea to insist that "prove" be in
> the same directory we found "perl" in.

Thank you for the analysis. I agree about "prove".

As for Test::More:

Test::More has been bundled with Perl since 5.6.2 (you can use "corelist"
to check for these things), so if all fails, it might be possible to
extract a version from a Perl distribution [4].

CPAN authors are encouraged to clean out old versions due to the sheer
size of the archive. (Not all got the memo, tho...*cough*) and most
mirrors only carry the current files.

The original author is Michael G. Schwern [0]. But it seems he cleaned
house :)

You might have luck with an mirror [1] who didn't clean out, or with
archive.org.

But with Test::More, it seems a bit confusing, as it is part of
Test::Simple [2], which in turn is part of Test2, which is now on github
[3]. It's Test-Modules all the way down.

I'm not sure you'd find old Test::More versions ready-to-use in this.

My apologies if you knew that already.

However, I do so happen to have a large archive with Perl releases and
CPAN modules. It was first mirrored on mid-2015 - so anything that was
deleted before 2015 unfortunately I can't help you with that.

But if you need a specific module version, just ping me and I can see if
it's in there.

Hope this helps,

Tels

[0]: http://ftp.nluug.nl/languages/perl/CPAN/authors/id/M/MS/MSCHWERN/
[1]: http://mirrors.cpan.org/
[2]: http://search.cpan.org/~exodist/Test-Simple-1.302086/
[3]: https://github.com/Test-More/test-more
[4]: http://www.cpan.org/src/5.0/ - tho the timestamps seem to ben have
reset on some of the files. 5.8.3 is from 2004 not 2011.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2017-07-30 15:48:14 Re: PL_stashcache, or, what's our minimum Perl version?
Previous Message Ashutosh Sharma 2017-07-30 08:37:00 Re: Page Scan Mode in Hash Index