Re: Export and import of statistics data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Holger Jakobs <holger(at)jakobs(dot)com>
Cc: "[PGSQL-ADMIN-LIST]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Export and import of statistics data
Date: 2021-02-23 19:32:30
Message-ID: 3891953.1614108750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Holger Jakobs <holger(at)jakobs(dot)com> writes:
> Is there a way of exporting statistics data from a database cluster
> containing a lot of rows and import them into a similar structured, but
> small database cluster.

Not at present, AFAIK. There have been discussions of creating a
way to do that, and I know of at least one non-public tool that
does it, but nobody's pushed things to the point of having code
the community would accept.

The key stumbling block is inventing a dump representation that
would have realistic prospects of still being importable if/when
we change the contents of pg_statistic. Certainly there are a
lot of applications where cross-version compatibility isn't a
requirement; but I don't think the community would take code that
isn't usable by pg_upgrade, and for that you need an upgradable
design.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Vipin Madhusoodanan 2021-02-23 23:53:04 How to encrypt password in pgpass file
Previous Message Holger Jakobs 2021-02-23 18:53:17 Export and import of statistics data