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 1rz08O-001TKh-Nv for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Apr 2024 20:19:28 +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 1rz08N-00FSfS-6A for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Apr 2024 20:19:27 +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 1rz08M-00FSfC-Ok for pgsql-hackers@lists.postgresql.org; Mon, 22 Apr 2024 20:19:26 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rz08F-0048lX-QM for pgsql-hackers@lists.postgresql.org; Mon, 22 Apr 2024 20:19:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43MKJDEg3156141; Mon, 22 Apr 2024 16:19:13 -0400 From: Tom Lane To: Jeff Davis cc: Nathan Bossart , Corey Huinker , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Matthias van de Meent , Peter Smith , PostgreSQL Hackers , Tomas Vondra Subject: Re: Statistics Import and Export In-reply-to: <0943da4616837682c65e4620050b8b1e86fe3503.camel@j-davis.com> References: <1841621.1712093467@sss.pgh.pa.us> <06286ee47fa4b06b6e7f08da21958d7e35525ed4.camel@j-davis.com> <149855.1712164687@sss.pgh.pa.us> <261289.1712174567@sss.pgh.pa.us> <1798867.1712376328@sss.pgh.pa.us> <20240417165053.GA3253364@nathanxps13> <0943da4616837682c65e4620050b8b1e86fe3503.camel@j-davis.com> Comments: In-reply-to Jeff Davis message dated "Mon, 22 Apr 2024 10:56:54 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3156139.1713817153.1@sss.pgh.pa.us> Date: Mon, 22 Apr 2024 16:19:13 -0400 Message-ID: <3156140.1713817153@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > Would it make sense to have a new SECTION_STATS? Perhaps, but the implications for pg_dump's API would be nontrivial, eg would we break any applications that know about the current options for --section. And you still have to face up to the question "does --data-only include this stuff?". > Philosophically, I suppose stats are data, but I still don't understand > why considering stats to be data is so important in pg_dump. > Practically, I want to dump stats XOR data. That's because, if I dump > the data, it's so costly to reload and rebuild indexes that it's not > very important to avoid a re-ANALYZE. Hmm, interesting point. But the counterargument to that is that the cost of building indexes will also dwarf the cost of installing stats, so why not do so? Loading data without stats, and hoping that auto-analyze will catch up sooner not later, is exactly the current behavior that we're doing all this work to get out of. I don't really think we want it to continue to be the default. regards, tom lane