Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9037-0005h7-1Y for pgsql-general@arkaria.postgresql.org; Tue, 13 Jun 2023 09:10:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9035-0005JJ-IN for pgsql-general@arkaria.postgresql.org; Tue, 13 Jun 2023 09:10:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9034-0005J6-UE for pgsql-general@lists.postgresql.org; Tue, 13 Jun 2023 09:10:47 +0000 Received: from smtp44.i.mail.ru ([95.163.41.82]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9031-001wj1-2D for pgsql-general@postgresql.org; Tue, 13 Jun 2023 09:10:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail4; h=In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Content-Type:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=MpGOjRIIC3tg7euIXULQ/QXptl+u6VHE378yt+LnnYY=; t=1686647443;x=1686737443; b=zzgW+lzpnxvJ1IUfFUOb+Bv9aK98IN+DVeENQ7Qg8sXDN1hB52F8zw5WvADWcvNQLIcLV7sD3DEP0EwP9dd+HiZWY/awLO4kipJ4ZQQo1cEsTQBvhk9ptmpbz26Uw/SubMVwE25pQ7ODGkrhjRCQmVHQf+cRMfZc/rbB3MwuC4Tmcl/aGycw6BFtHgEh7ReaBSpPyQmEkUlaPzu+rBk+37Qz+pbFfOI+HKlNZFza/WHJdTooDolv57X4gNpNN65uMKOEOykroFC50Q7en6GlHjmHzb+ikGXC50rgKy8xIjhZtsNEngMQey4v0bvXcnb6GKlhLruVY/gGR0YkAr41yA==; Received: by smtp44.i.mail.ru with esmtpa (envelope-from ) id 1q902x-00AOOA-JG; Tue, 13 Jun 2023 12:10:40 +0300 Content-Type: multipart/alternative; boundary="------------SeXiy8c270Gwor29dOQ4p7BT" Message-ID: <9852446f-e4f0-ab56-60f0-5ea393479ab8@mail.ru> Date: Tue, 13 Jun 2023 13:10:38 +0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: pg_upgrade v15 not generating analyze_new_cluster.sh Content-Language: en-US To: Magnus Hagander Cc: pgsql-general General References: From: rihad In-Reply-To: Authentication-Results: smtp44.i.mail.ru; auth=pass smtp.auth=rihad@mail.ru smtp.mailfrom=rihad@mail.ru X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD965EFE7F2AC62B27AB24AE10668D056473C1AE95DCD1C62BF182A05F5380850405A937BE8EAD29D37AE57CB912EF5D4E74D8C297BDF127CA0D4567A9AAA701CE1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AD2F2D6F6013FF7FC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE705B093C0FC4B30B9EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBAE776129B02EA24EBD3F58385A96519D820879F7C8C5043D14489FFFB0AA5F4BF176DF2183F8FC7C0DEC8C2C8BCD2534D8941B15DA834481FA18204E546F3947CC6602A96AF88C695F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637498978385686B898389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F79006370F066F67985E9A20D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE789A16319AD71F669EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3EB9EA62DB0D2896935872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A54E828D554403F5B83152BF2CDE2695B565EA75A0B744E057F87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742DC8270968E61249B1004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34E20F2278F74481A1FA37E7891E78DD8EFD726B6E98E1295D4ABDF3BE66B5948719C8CD9A45A3D37A1D7E09C32AA3244CD748124DD2A3128673E52AB4D319F9D030363D8B7DA7DD443A1A83191EB2B8F05DA084F8E80FEBD3CCC70829E2345EA9F0A6D2C91ED28CB6 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMslUgTLgY7HVWCBZdA9Sxg== X-Mailru-Sender: 74AC901D72E61D165302087926F40C5A520B120FA41D2B6BED5181ED350E3737B7EA9FE7735C3DBFA00D7FFBEFC6EB2A928A2593B14EC4C3430568AAE1C9FDD0C77752E0C033A69E3453F38A29522196 X-Mras: Ok List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------SeXiy8c270Gwor29dOQ4p7BT Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/13/23 12:57, Magnus Hagander wrote: > On Tue, Jun 13, 2023 at 10:35 AM rihad 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. --------------SeXiy8c270Gwor29dOQ4p7BT Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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.

--------------SeXiy8c270Gwor29dOQ4p7BT--