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 1rr07M-00F8d3-Sg for pgsql-hackers@arkaria.postgresql.org; Sun, 31 Mar 2024 18:41:21 +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 1rr07J-00D6kE-JD for pgsql-hackers@arkaria.postgresql.org; Sun, 31 Mar 2024 18:41:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rr07J-00D6k6-9f for pgsql-hackers@lists.postgresql.org; Sun, 31 Mar 2024 18:41:17 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rr07A-007qdF-Vf for pgsql-hackers@lists.postgresql.org; Sun, 31 Mar 2024 18:41:16 +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 42VIf0DD790137; Sun, 31 Mar 2024 14:41:00 -0400 From: Tom Lane To: Corey Huinker cc: Magnus Hagander , Jeff Davis , Stephen Frost , Ashutosh Bapat , Matthias van de Meent , Peter Smith , PostgreSQL Hackers , Tomas Vondra Subject: Re: Statistics Import and Export In-reply-to: References: <54f190b6c757da2a33cce811949e9dd9601fcba7.camel@j-davis.com> <1632327b74a734f8c434eb75e824160d2b06a697.camel@j-davis.com> <16412b8b7ae443cb7470006beff3011927048860.camel@j-davis.com> <1b1bd1ec39ab3de09a17bf7b241021067e5bd63c.camel@j-davis.com> <2bce855db8259c5672a09f863a307ca07b967b68.camel@j-davis.com> <5e94c358caedf2a231dd71624c3578db7227a265.camel@j-davis.com> <4afa70edab849ff16238d1100b6652404e9a4d9d.camel@j-davis.com> <3df03aa65aa6ea3a76582e1a792e422dc5c32ad3.camel@j-davis.com> <718fa933c2c58d0ecc61995ab5c7ca1fe78d6369.camel@j-davis.com> Comments: In-reply-to Corey Huinker message dated "Sun, 31 Mar 2024 07:17:26 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <790135.1711910460.1@sss.pgh.pa.us> Date: Sun, 31 Mar 2024 14:41:00 -0400 Message-ID: <790136.1711910460@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Corey Huinker writes: > Having given this some thought, I'd be inclined to create a view, > pg_stats_missing, with the same security barrier as pg_stats, but looking > for tables that lack stats on at least one column, or lack stats on an > extended statistics object. The week before feature freeze is no time to be designing something like that, unless you've abandoned all hope of getting this into v17. There's a bigger issue though: AFAICS this patch set does nothing about dumping extended statistics. I surely don't want to hold up the patch insisting that that has to happen before we can commit the functionality proposed here. But we cannot rip out pg_upgrade's support for post-upgrade ANALYZE processing before we do something about extended statistics, and that means it's premature to be designing any changes to how that works. So I'd set that whole topic on the back burner. It's possible that we could drop the analyze-in-stages recommendation, figuring that this functionality will get people to the able-to-limp-along level immediately and that all that is needed is a single mop-up ANALYZE pass. But I think we should leave that till we have a bit more than zero field experience with this feature. regards, tom lane