Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tQsru-005nGT-MQ for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2024 18:45:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tQsrt-0041PY-JW for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2024 18:45:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tQsrt-0041PP-9E for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2024 18:45:57 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tQsrr-000ges-1J for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2024 18:45:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=RWOkBkLfiEtnNFdb8GFzA7jpyN13ORzj8UX2dXKgwy4=; b=aS9cd XrpO/WY/BdslLSljeQKDYsicBIyVszDueUH6vRlCI69w0nKW7LN5k5jCPaS948uTkOcnDepQ8YWD2 toC1MP81oeu6eAv4ohYo1+zCb5Rkvk24NzGIZEdVBxkxO/kSg1d8hI4ZkxyfY7DtUSR6hmVvtF8Xk b7aiBT+30lPqgzARaPZerGmkYd9QEX0e7IfCYZ0tyBfowltHcIXFef8fqC0m5XfIInhoMYQApIOVx oeJe4xPYDIekgEbchXzF+D/AndOfb3a04af3C1grlIOiDvtuqcmQSFktkVZI5xffQxJE3BTciopaw sGXOSvRvavBqbaU4y16mdNynDS4QQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tQsrn-00CBJ0-2U; Thu, 26 Dec 2024 13:45:51 -0500 Date: Thu, 26 Dec 2024 13:45:51 -0500 From: Bruce Momjian To: Jeff Davis Cc: Corey Huinker , jian he , Matthias van de Meent , Tom Lane , Nathan Bossart , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Subject: Re: Statistics Import and Export Message-ID: References: <5d3a24216d15ce8a50d0fc085a13a410202014ca.camel@j-davis.com> <3bd40d2c686608196b8e04c2aaac9c57c447aae6.camel@j-davis.com> <57990731eb9f5563f83e611a2493a95b1a7d819e.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57990731eb9f5563f83e611a2493a95b1a7d819e.camel@j-davis.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Dec 19, 2024 at 09:23:20PM -0800, Jeff Davis wrote: > On Fri, 2024-12-13 at 00:22 -0500, Corey Huinker wrote: > > Per offline conversation with Jeff, adding a --no-schema to pg_dump > > option both for completeness (we already have --no-data and --no- > > statistics), but users who previously got the effect of --no-schema > > did so by specifying --data-only, which suppresses statistics as > > well. > > > > 0001-0005 - changes to pg_dump/pg_upgrade > > Attached is a version 36j where I consolidated these patches and > cleaned up the documentation. It doesn't make a lot of sense to commit > them separately, because as soon as the pg_dump changes are there, the > pg_upgrade test starts showing a difference until it starts using the - > -no-data option. > > The biggest functional change is the way dependencies are handled for > matview stats. Materialized views ordinarily end up in > SECITON_PRE_DATA, but in some cases they can be postponed to > SECTION_POST_DATA. You solved that by always putting the matview stats > in SECTION_POST_DATA. > > I took a different approach here and, when the matview is postponed, > also postpone the matview stats. It's slightly more code, but it felt > closer to the rest of the structure, where postponing is a special case > (that we might be able to remove in the future). I am confused by this: Add options --with-statistics/--no-statistics to pg_upgrade to enable/disable transferring of statistics to the upgraded cluster. The default is --with-statistics. If statistics is the default for pg_upgrade, why would we need a --with-statistics option? Also, I see a misspelling: + printf(_(" --no-statisttics do not import statistics from old cluster\n")); -- -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.