Trial fix for old cross-version upgrades.

Per buildfarm and reports, it seems that 9.X to 18 upgrades were
failing after commit 1fd1bd8710 due to an incorrect regex. Loosen the
regex to accommodate older versions.

Reported-by: vignesh C <vignesh21@gmail.com>
Reported-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CALDaNm3GUs+U8Nt4S=V5zmb+K8-RfAc03vRENS0teeoq0Lc6Tw@mail.gmail.com
Discussion: https://postgr.es/m/ea4cbbc1-c5a5-43d1-9618-8ff3f2155bfe@dunslane.net
pull/200/head
Jeff Davis 4 months ago
parent 8e4d72573c
commit ab84d0ff80
  1. 4
      src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm

@ -296,7 +296,7 @@ sub adjust_old_dumpfile
# Same with version argument to pg_restore_relation_stats() or # Same with version argument to pg_restore_relation_stats() or
# pg_restore_attribute_stats(). # pg_restore_attribute_stats().
$dump =~ s ['version', '${old_version}\d{4}'::integer,] $dump =~ s ['version', '\d+'::integer,]
['version', '000000'::integer,]mg; ['version', '000000'::integer,]mg;
if ($old_version < 16) if ($old_version < 16)
@ -633,7 +633,7 @@ sub adjust_new_dumpfile
# Same with version argument to pg_restore_relation_stats() or # Same with version argument to pg_restore_relation_stats() or
# pg_restore_attribute_stats(). # pg_restore_attribute_stats().
$dump =~ s ['version', '\d{6}'::integer,] $dump =~ s ['version', '\d+'::integer,]
['version', '000000'::integer,]mg; ['version', '000000'::integer,]mg;
if ($old_version < 14) if ($old_version < 14)

Loading…
Cancel
Save