postgres.git / summary / log / commit / refs

commit    415cd3bfb4c08eae7b6faf9fa1c83eed2ab6f43f
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Oct 07 01:16:52 2026 +0000
First released in: 14.25, 15.20, 16.16, 17.12, 18.7, 19.0

    Don't attempt to upgrade bpchar indexes from versions before 14.
    
    As of a32b8dc98 and friends, amcheck will complain about bpchar
    indexes that claim to allow de-duplication.  This causes our
    cross-version-upgrade tests to fail when upgrading from a version
    that lacks those commits, since there are some such indexes in the
    core regression tests.  Drop such indexes from the upgrade source
    database.  (oidvector indexes would be problematic too, but
    there aren't any user-defined indexes on oidvector in our tests.)
    
    Author: Peter Geoghegan <pg@bowt.ie>
    Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
    Discussion: https://postgr.es/m/CAH2-Wzk-oO3HjLaByo8Vpse6Tpha1mqAW8DFShh-kS-Wo59ugA@mail.gmail.com
    Backpatch-through: 14


src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index c0ac3cc0d7c..856a898f2d4 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -98,6 +98,25 @@ sub adjust_database_contents 'drop extension if exists test_ext7'); } + # We can no longer upgrade bpchar indexes that claim deduplication ability + # (amcheck will complain about them), so drop them if source is pre-v14. + if ($old_version < 14) + { + if ($dbnames{"regression"}) + { + _add_st($result, 'regression', + 'drop index if exists public.hslot_hubname', + 'drop index if exists public.hslot_name', + 'drop index if exists public.hub_name', + 'drop index if exists public.iface_name', + 'drop index if exists public.phone_name', + 'drop index if exists public.pline_name', + 'drop index if exists public.pslot_name', + 'drop index if exists public.room_rno', + 'drop index if exists public.wslot_name'); + } + } + # stuff not supported from release 14 if ($old_version < 14) { [parent: 4697138049a1]