From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Compare only major versions in AdjustUpgrade.pm |
Date: | 2023-07-24 15:23:18 |
Message-ID: | E1qNxP3-0017ZE-G1@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Compare only major versions in AdjustUpgrade.pm
Because PostgreSQL::Version is very nuanced about development version
numbers, the comparison to 16beta2 makes it think that that release is
older than 16, therefore applying a database tweak that doesn't work
there (the comparison is only supposed to match when run on version 15).
As suggested by Andrew Dunstan, fix by having AdjustUpgrade.pm public
methods create a separate PostgreSQL::Version object to use for these
comparisons, that only carries the major version number.
While at it, have the same methods ensure that the objects given are of
the expected type.
Backpatch to 16. This module goes all the way back to 9.2, but there's
probably no need for this fix except where betas still live.
Co-authored-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Discussion: https://postgr.es/m/20230719110504.zbu74o54bqqlsufb@alvherre.pgsql
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/28ce9d51f9082318e84f2a84385871394dcf2130
Modified Files
--------------
src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2023-07-24 15:56:52 | pgsql: Make test_decoding ddl.out shorter |
Previous Message | Michael Paquier | 2023-07-24 04:50:01 | pgsql: pgbench: Use COPY for client-side data generation |