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:39:59 -0600
Message-ID: <CAA5RZ0vgx8n98dcybr16V5mECEJRruBLMgDoVpmtpG+5D+5VPg@mail.gmail.com> (raw)
In-Reply-To: <CAA5RZ0udD=7o6pjBSiEEzN60Jd3X1=vrXed+0YivYCVrqvav=Q@mail.gmail.com>
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]>
<CAA5RZ0udD=7o6pjBSiEEzN60Jd3X1=vrXed+0YivYCVrqvav=Q@mail.gmail.com>
> I also tested the same regexp expression in isolation
> and I could not repro the issue. Will try a real dumpfile next.
>
repro'd. I don't want to attach the file here, but I added a cp
to get the dump file somewhere local
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -326,10 +326,12 @@ $oldnode->restart;
my @dump_command = (
'pg_dumpall', '--no-sync', '-d', $oldnode->connstr('postgres'),
'-f', $dump1_file);
+
# --extra-float-digits is needed when upgrading from a version older than 11.
push(@dump_command, '--extra-float-digits', '0')
if ($oldnode->pg_version < 12);
$newnode->command_ok(\@dump_command, 'dump before running pg_upgrade');
+system("cp $dump1_file /tmp/myfile.dmp");
and ran with the following perl script
"""
use strict;
use File::Slurp;
my $dump = read_file( '/tmp/myfile.dmp' );
#my $dump = "filler\n 'version', '180000'::integer,\n filler";
print "$dump\n";
$dump =~ s [(^\s+'version',) '\d+'::integer,$] [$1 '000000'::integer,]mg;
print "$dump\n";
"""
--
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: <CAA5RZ0vgx8n98dcybr16V5mECEJRruBLMgDoVpmtpG+5D+5VPg@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