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.96) (envelope-from ) id 1w53JC-002qWn-2F for pgsql-docs@arkaria.postgresql.org; Tue, 24 Mar 2026 15:04:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w53JB-007Qn9-0K for pgsql-docs@arkaria.postgresql.org; Tue, 24 Mar 2026 15:04:41 +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.96) (envelope-from ) id 1w53JA-007Qn1-2r for pgsql-docs@lists.postgresql.org; Tue, 24 Mar 2026 15:04:41 +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.98.2) (envelope-from ) id 1w53J9-00000000o71-28YK for pgsql-docs@lists.postgresql.org; Tue, 24 Mar 2026 15:04:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=ab272EwuYPRr3Yc6LENUp1pZXhVSd7ykn6OXKNM+bPU=; b=xqYi+Nbv5NlQ3SnZCmSskN22W5 l7m+YDq4pk02BB8xF8Rt8WCFRqPoeQ2EVojIXjuw4M1sT7MRZHT/aAX/7jlm+I7q+S6xkewVhtw5X oqflbYAvvG9Z5JgU59FUbkk5tP/wCtSYPiprNRJLR8IwiTHfj/h0sRCIWgLBYoCaLbbGTW8688tQJ fU0BZtQGFwhvJ4ERLDWQ0W/Too9KWvNKrHgJfjOs6HAEFJlZztQXRK9idwOSZbdMpP9xKrnZggkr0 em3YYnc4013MOfU8N8UO28uUIx9xax6VKID+eW09IICu2xDOYjwZVAP6a0V4UuGs4XhDhl0VbwTB2 /uV/oc1w==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1w53J8-00000003Nvs-0zT9; Tue, 24 Mar 2026 11:04:38 -0400 Date: Tue, 24 Mar 2026 11:04:38 -0400 From: Bruce Momjian To: Nikolay Samokhvalov Cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version Message-ID: References: <1a7d3c03e6169e6340f9d77667433fd0cc5f5897.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 24, 2026 at 05:36:42AM -0700, Nikolay Samokhvalov wrote: > On Mon, Mar 23, 2026 at 23:59 Laurenz Albe wrote: > ... > > I think that your patch offers too much detail, > like from which relations the statistics are extracted.  Anybody > who wants to know that level of detail probably has to read the > source code anyway. > > How about adding a simple remark, like > > --- a/doc/src/sgml/ref/pgupgrade.sgml > +++ b/doc/src/sgml/ref/pgupgrade.sgml > @@ -837,6 +837,8 @@ psql --username=postgres --file=script.sql postgres >       all statistics, such as those created explicitly with >       , custom statistics added by >       an extension, or statistics collected by the cumulative statistics > system. > +     Transferring optimizer statistics works regardless of the old > cluster's > +     major version. >       > >       > > > That would work too -- my goal was just to resolve confusion. I was under the same impression --- that it only worked with upgrades _from_ PG 18 and later. However, I can't find any documentation on this limitation, so why did so many think this was true? I don't think adding anything to the docs is the right approach. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.