1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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
This commit is contained in:
Jeff Davis
2025-02-20 10:21:24 -08:00
parent 8e4d72573c
commit ab84d0ff80

View File

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