Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version
Date: 2026-03-24 15:04:38
Message-ID: acKoBql5eQWpQH4N@momjian.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, Mar 24, 2026 at 05:36:42AM -0700, Nikolay Samokhvalov wrote:
> On Mon, Mar 23, 2026 at 23:59 Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> 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
>       <xref linkend="sql-createstatistics"/>, 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.
>      </para>
>
>      <para>
>
>
> 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 <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2026-03-24 16:53:27 Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version
Previous Message Nikolay Samokhvalov 2026-03-24 12:36:42 Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version