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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Jeff Davis <jdavis(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Trial fix for old cross-version upgrades.
Date: 2025-02-22 02:00:01
Message-ID: 3815127.1740189601@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Jeff Davis <pgsql(at)j-davis(dot)com> 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

Attachment Content-Type Size
bf-lock-stats.patch text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2025-02-22 02:48:40 Re: pgsql: Trial fix for old cross-version upgrades.
Previous Message Andres Freund 2025-02-22 01:56:44 pgsql: Allow lwlocks to be disowned