pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Export and import of statistics data
2+ messages / 2 participants
[nested] [flat]

* Export and import of statistics data
@ 2021-02-23 18:53 Holger Jakobs <holger@jakobs.com>
  2021-02-23 19:32 ` Re: Export and import of statistics data Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Holger Jakobs @ 2021-02-23 18:53 UTC (permalink / raw)
  To: pgsql-admin

Hi everybody,

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.

The purpose of this is testing and comparing execution plans on a small 
machine. Of course executing the statement wouldn't make much sense, so 
I would use only EXPLAIN, not EXPLAIN ANALYZE.

Due to data protection and capacity it's not possible to copy the 
production database or even access it.

Thanks and best regards

Holger

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

Attachments:

  OpenPGP_signature (application/pgp-signature, 202B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Export and import of statistics data
  2021-02-23 18:53 Export and import of statistics data Holger Jakobs <holger@jakobs.com>
@ 2021-02-23 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-02-23 19:32 UTC (permalink / raw)
  To: Holger Jakobs <holger@jakobs.com>; +Cc: pgsql-admin

Holger Jakobs <holger@jakobs.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-02-23 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 18:53 Export and import of statistics data Holger Jakobs <holger@jakobs.com>
2021-02-23 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox