Re: Statistics Import and Export - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Statistics Import and Export
Date
Msg-id CADkLM=fyJ-Y-DNk1aW09btZYdXDXS79xT8oFPTQ6sspWHaqdog@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Statistics Import and Export
List pgsql-hackers
On Sat, Dec 7, 2024 at 2:27 PM Jeff Davis <pgsql@j-davis.com> wrote:
On Tue, 2024-11-26 at 17:11 -0500, Corey Huinker wrote:
>
> > * Why does binary upgrade cause statistics to be dumped? Can you
> > just
> > make pg_upgrade specify the appropriate set of flags?
> >
>
>
> That decision goes back a ways, I tried to dig in the archives last
> night but I was getting a Server Error on postgresql.org.

I suggest that pg_upgrade be changed to pass --no-data to pg_dump,
rather than --schema-only.

That way, you don't need to create a special case for the pg_dump
default that depends on whether it's a binary upgrade or not.

+1
 
If wanted, there could also be a new option to pg_upgrade to specify --
with-statistics (default, passes --no-data to pg_dump) or --no-
statistics (passes --schema-only to pg_dump). But that option is
probably not necessary; everyone upgrading probably wants the stats.

This makes sense, though perhaps instead of --schema-only perhaps we should pass both --no-statistics and --no-data. I don't envision a fourth option to the new data/schema/stats triumvirate, but --no-statistics shouldn't have a bearing on that future fourth option.
 

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Statistics Import and Export
Next
From: Jeff Davis
Date:
Subject: Re: Statistics Import and Export