public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sami Imseih <[email protected]>
To: Tom Lane <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
Date: Fri, 28 Feb 2025 12:15:52 -0600
Message-ID: <CAA5RZ0udD=7o6pjBSiEEzN60Jd3X1=vrXed+0YivYCVrqvav=Q@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAA5RZ0u9dV3CdKqkqdusA_RdvBkwWe0c0rxcFWj++VYoutFYSw@mail.gmail.com>
<[email protected]>
> 5.16 is still supported according to our install instructions,
> so let's see if we can adjust that regex so it works with 5.16.
> The first thing I'd try is
>
> - $dump =~ s {(^\s+'version',) '\d+'::integer,$}
> + $dump =~ s {^(\s+'version',) '\d+'::integer,$}
>
With the diff below, I still observed the same issue.
@@ -296,7 +296,7 @@ sub adjust_old_dumpfile
# Same with version argument to pg_restore_relation_stats() or
# pg_restore_attribute_stats().
- $dump =~ s {(^\s+'version',) '\d+'::integer,$}
+ $dump =~ s {^(\s+'version',) '\d+'::integer,$}
{$1 '000000'::integer,}mg;
if ($old_version < 16)
@@ -645,7 +645,7 @@ sub adjust_new_dumpfile
# Same with version argument to pg_restore_relation_stats() or
# pg_restore_attribute_stats().
- $dump =~ s {(^\s+'version',) '\d+'::integer,$}
+ $dump =~ s {^(\s+'version',) '\d+'::integer,$}
{$1 '000000'::integer,}mg;
I also tested the same regexp expression in isolation
and I could not repro the issue. Will try a real dumpfile next.
/tmp/test.pl
"""
use strict;
my $dump = " 'version', '180000'::integer,";
print "$dump\n";
$dump =~ s [(^\s+'version',) '\d+'::integer,$] [$1 '000000'::integer,]mg;
print "$dump\n";
"""
simseih % /usr/bin/perl -v | grep "This is perl"
This is perl 5, version 16, subversion 3 (v5.16.3) built for
x86_64-linux-thread-multi
simseih % /usr/bin/perl /tmp/test.pl
'version', '180000'::integer,
'version', '000000'::integer,
--
Sami
view thread (30+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
In-Reply-To: <CAA5RZ0udD=7o6pjBSiEEzN60Jd3X1=vrXed+0YivYCVrqvav=Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox