Re: pg_upgrade v15 not generating analyze_new_cluster.sh

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: rihad <rihad(at)mail(dot)ru>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade v15 not generating analyze_new_cluster.sh
Date: 2023-06-13 08:57:43
Message-ID: CABUevEzozzmHLDxWsLk7m=2rCwzYuKEf3mkExf_nSmshV_DfLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 13, 2023 at 10:35 AM rihad <rihad(at)mail(dot)ru> wrote:
>
> Hi, all. When pg_upgrading from PG 11 to 13, a file analyze_new_cluster.sh was generated in the current directory which ran vacuumdb --all --analyze-in-stages
>
> When upgrading from 13 to 15.3 no such file was generated, which made me believe it was no longer necessary. Alas, it wasn't the case. The database was extremely slow after the upgrade chewing up 100% cpu time, and it wasn't until I manually ran vacuumdb" --all --analyze-in-stages that cpu usage dropped. Was there a knob that I missed, or is this just a bug in pg_upgrade 15? Thanks.

If you look at the output of pg_upgrade, it still tells you to run
"vacuumdb --all --analyze-in-stages". Since that was the *only*
command that was in the script, the script is no longer generated and
you're expected to run the command directly instead. It does not
remove the need for the job, just instructs you to do it without the
script.

This change was made in PostgreSQL 14, not 15, and is listed in the
release notes there. When you upgrade "past" a version, it's
recommended you read the release notes for the intermediate versions
as well when looking for changes, as those will not be included in the
notes for the newer version.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lorusso Domenico 2023-06-13 09:07:22 Re: Dynamic binding issue
Previous Message rihad 2023-06-13 08:35:46 pg_upgrade v15 not generating analyze_new_cluster.sh