pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rihad <rihad@mail.ru>
To: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: pg_upgrade v15 not generating analyze_new_cluster.sh
Date: Tue, 13 Jun 2023 13:10:38 +0400
Message-ID: <9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru> (raw)
In-Reply-To: <CABUevEzozzmHLDxWsLk7m=2rCwzYuKEf3mkExf_nSmshV_DfLg@mail.gmail.com>
References: <cc1abb0d-aeda-d240-c1cc-58bbce6dec65@mail.ru>
	<CABUevEzozzmHLDxWsLk7m=2rCwzYuKEf3mkExf_nSmshV_DfLg@mail.gmail.com>

On 6/13/23 12:57, Magnus Hagander wrote:
> On Tue, Jun 13, 2023 at 10:35 AM rihad<rihad@mail.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.
>

Oh, shoooot... thanks. pg_upgrade was one of several commands my script 
ran, that also removed PG 13 & installed PG 15 etc right after that, 
that's why I missed pg_upgrade's output and to be honest wasn't 
expecting it to say anything important, because, for instance, it did 
generate update_extensions.sql and delete_old_cluster.sh, which is, btw, 
also a one-liner)) I'd rather that file wasn't generated but just 
mentioned in the output as it has nothing to do with how new cluster 
works, than mentioning vacuumdb as it's crucial to make PG useful in 
most non-test scenarios at all.

view thread (4+ messages)

Message-ID: <9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru>
Permalink:  ../9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru/
Also on:    postgresql.org/message-id/9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rihad@mail.ru, magnus@hagander.net
  Subject: Re: pg_upgrade v15 not generating analyze_new_cluster.sh
  In-Reply-To: <9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru>
  References: <cc1abb0d-aeda-d240-c1cc-58bbce6dec65@mail.ru> <CABUevEzozzmHLDxWsLk7m=2rCwzYuKEf3mkExf_nSmshV_DfLg@mail.gmail.com> <9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox