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 1trl44-0098Nl-Ak for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Mar 2025 21:53:36 +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 1trl42-0011Nq-Rv for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Mar 2025 21:53:34 +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 1trl42-0011NG-HO for pgsql-hackers@lists.postgresql.org; Mon, 10 Mar 2025 21:53:34 +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.96) (envelope-from ) id 1trl40-0026cc-2D for pgsql-hackers@lists.postgresql.org; Mon, 10 Mar 2025 21:53:33 +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 52ALrQxY1322263; Mon, 10 Mar 2025 17:53:26 -0400 From: Tom Lane To: Jeff Davis cc: Ashutosh Bapat , Corey Huinker , Andres Freund , Michael Paquier , Nathan Bossart , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Peter Smith , PostgreSQL Hackers , Alvaro Herrera , jian he Subject: Re: Statistics Import and Export: difference in statistics dumped In-reply-to: <1116282.1741374848@sss.pgh.pa.us> References: <97b451228227c555be1a4f79c4a62ddec9a74f06.camel@j-davis.com> <1457469.1740419458@sss.pgh.pa.us> <8d13e4296408c53a93390525d0bcb906cbd13df4.camel@j-davis.com> <768b2a237e892bf1334bdcbb066cdc1bd1368cb2.camel@j-davis.com> <5053263e41692dc2358a642403e9aa6fcda53578.camel@j-davis.com> <1116282.1741374848@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 07 Mar 2025 14:14:08 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1322261.1741643606.1@sss.pgh.pa.us> Date: Mon, 10 Mar 2025 17:53:26 -0400 Message-ID: <1322262.1741643606@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > I think what is happening is that the patch shut off CREATE > INDEX's update of not only the table's stats but also the > index's stats. This seems unhelpful: the index's empty > stats can never be what's wanted. I looked at this more closely and realized that it's a simple matter of having made the tests in the wrong order. The whole stanza should only apply when dealing with the table, not the index. I verified that this change fixes the cross-version-upgrade failure in local testing, and pushed it. regards, tom lane