Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.

Christoph Berg <myon@debian.org>

From: Christoph Berg <myon@debian.org>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Corey Huinker <corey.huinker@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-04-22T21:03:29Z
Lists: pgsql-hackers
Re: Nathan Bossart
> In any case, IMO it's unfortunate
> that we might end up recommending roughly the same post-upgrade steps as
> before even though the optimizer statistics are carried over.

Maybe the docs (and the pg_upgrade scripts) should recommend the old
procedure by default until this gap is closed? People could then still
opt to use the new procedure in specific cases.

Christoph



Commits

  1. Further adjust guidance for running vacuumdb after pg_upgrade.

  2. vacuumdb: Don't skip empty relations in --missing-stats-only mode.

  3. Update guidance for running vacuumdb after pg_upgrade.

  4. Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.