Re: pgsql: Trial fix for old cross-version upgrades.

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>, Jeff Davis <jdavis(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
Date: 2025-02-28 17:12:41
Message-ID: CAA5RZ0u9dV3CdKqkqdusA_RdvBkwWe0c0rxcFWj++VYoutFYSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

I was running "make check-world" this morning on a machine that has an
old version of perl, 5.16, and the check-world was hung on
/usr/bin/perl t/002_pg_upgrade.pl.

I never saw "make check-world" hang on this old version of perl,
but I bisected the regression to this commit fc0d0ce978752493,
the subject of this thread.

This is the pstack of the stuck perl process.

#0 0x00007f5964b4b1dc in Perl_fbm_instr () from
/usr/lib64/perl5/CORE/libperl.so
#1 0x00007f5964bd146f in Perl_re_intuit_start () from
/usr/lib64/perl5/CORE/libperl.so
#2 0x00007f5964bd3400 in Perl_regexec_flags () from
/usr/lib64/perl5/CORE/libperl.so
#3 0x00007f5964b6d3fc in Perl_pp_subst () from /usr/lib64/perl5/CORE/libperl.so
#4 0x00007f5964b67e1e in Perl_runops_standard () from
/usr/lib64/perl5/CORE/libperl.so
#5 0x00007f5964b07463 in perl_run () from /usr/lib64/perl5/CORE/libperl.so
#6 0x0000000000400cd9 in main ()

and specifically, the process hangs with this specific change.

- $dump =~ s ['version', '\d+'::integer,]
- ['version', '000000'::integer,]mg;
+ $dump =~ s {(^\s+'version',) '\d+'::integer,$}
+ {$1 '000000'::integer,}mg;

I repro'd on several machines with 5.16, and then issue went away once
I upgraded to a more recent version of perl; at least with 5.25, the
issue does
not occur.

I don't know if we need to do anything here, except for making sure we are
building with the most recent version of perl, but I wanted to mention this
here for awareness.

--

Sami

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-02-28 17:54:57 Re: pgsql: Trial fix for old cross-version upgrades.
Previous Message Jeff Davis 2025-02-28 04:42:53 pgsql: Adjust pg_dump tag for relation stats.