public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Jeff Davis <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
Date: Fri, 21 Feb 2025 21:00:01 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
Jeff Davis <[email protected]> writes:
> The version that I committed had the following change to
> 002_pg_upgrade.pl:
> # Stabilize stats before pg_dumpall.
> $oldnode->append_conf('postgresql.conf', 'autovacuum = off');
> $oldnode->restart;
> ...
> $newnode->append_conf('postgresql.conf', 'autovacuum = off');
> I think we need a similar change in the buildfarm client's
> TestUpgradeXversion.pm? Is -hackers the right place to discuss that?
I think we might indeed want that, but it doesn't seem to be the
explanation for the buildfarm failures, because the diffs look
to be consistent across runs which you'd not expect from
autovacuum-driven changes. I suspect that the problem is that
pg_dump is interpreting old-version stats in some way that doesn't
match up with what we get from restoring the dump.
I did experiment with the attached very-quick-n-dirty patch, which
should succeed in suppressing autovacuum in both the old and new
versions if I understand the code correctly (which I might well not).
It made no difference at all in the dump diffs ...
regards, tom lane
Attachments:
[text/x-diff] bf-lock-stats.patch (1.8K, 2-bf-lock-stats.patch)
download | inline diff:
--- PGBuild/Modules/TestUpgradeXversion.pm~ 2024-11-02 01:47:21.000000000 -0400
+++ PGBuild/Modules/TestUpgradeXversion.pm 2025-02-21 20:50:35.705564091 -0500
@@ -419,7 +419,7 @@ sub test_upgrade ## no critic (Subrou
# run in which it was set up, which will be gone by now, so we repoint
# it to the current run's tmpdir.
# listen_addresses will be set correctly and requires no adjustment.
- if (!$using_localhost)
+ # In any case, disable autovacuum to prevent stats changing under us.
{
my $tdir = $tmpdir;
$tdir =~ s!\\!/!g;
@@ -431,7 +431,9 @@ sub test_upgrade ## no critic (Subrou
$param = "unix_socket_directory"
if $oversion ne 'HEAD' && $oversion lt 'REL9_3_STABLE';
print $opgconf "\n# Configuration added by buildfarm client\n\n";
- print $opgconf "$param = '$tdir'\n";
+ print $opgconf "$param = '$tdir'\n"
+ if (!$using_localhost);
+ print $opgconf "autovacuum = off\n";
close($opgconf);
}
@@ -507,7 +509,7 @@ sub test_upgrade ## no critic (Subrou
. qq{> "$upgrade_loc/$oversion-initdb.log" 2>&1});
return if $?;
- unless ($using_localhost)
+ # Again, adjust connection location and disable autovacuum.
{
open(my $pgconf, ">>", "$installdir/$oversion-upgrade/postgresql.conf")
|| die "opening $installdir/$oversion-upgrade/postgresql.conf: $!";
@@ -515,8 +517,12 @@ sub test_upgrade ## no critic (Subrou
$tmp_param = "unix_socket_directory"
if $this_branch ne 'HEAD' && $this_branch lt 'REL9_3_STABLE';
print $pgconf "\n# Configuration added by buildfarm client\n\n";
- print $pgconf "listen_addresses = ''\n";
- print $pgconf "$tmp_param = '$tmpdir'\n";
+ unless ($using_localhost)
+ {
+ print $pgconf "listen_addresses = ''\n";
+ print $pgconf "$tmp_param = '$tmpdir'\n";
+ }
+ print $pgconf "autovacuum = off\n";
close($pgconf);
}
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]
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
In-Reply-To: <[email protected]>
* 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