public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christoph Berg <[email protected]>
To: Nathan Bossart <[email protected]>
To: Corey Huinker <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.
Date: Tue, 22 Apr 2025 21:43:56 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Re: Nathan Bossart
> Update guidance for running vacuumdb after pg_upgrade.
>
> Now that pg_upgrade can carry over most optimizer statistics, we
> should recommend using vacuumdb's new --missing-stats-only option
> to only analyze relations that are missing statistics.
I've been looking at vacuumdb --missing-stats-only because Debian's
pg_upgradecluster is using that now.
I am wondering if this is really good advice in the pg_upgrade
documentation. Sure it's nice that optimizer statistics are carried
over by pg_upgrade, but the pg_stat_user_tables statistics are not
carried over, and afaict these are the numbers that determine when the
next autovacuum or autoanalyze run is going to happen. By removing the
"please run vacuumdb on all tables" step from the pg_upgrade docs, we
are effectively telling everyone that they should be starting with
these numbers all 0, postponing the next run to some indeterminate
point. Running `vacuumdb --missing-stats-only` does not fix that
because it's skipping the tables. Is that the message we want to send?
(If I am misinterpreting the situation the docs should still explain
why this is ok.)
Christoph
view thread (12+ 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]
Subject: Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.
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