Re: Dump/Reload pg_statistic to cut time from pg_upgrade?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jerry Sievers <gsievers19(at)comcast(dot)net>, Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Dump/Reload pg_statistic to cut time from pg_upgrade?
Date: 2013-07-23 23:47:57
Message-ID: 20130723234757.GB31462@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Jul 10, 2013 at 12:46:26PM -0400, Tom Lane wrote:
> Jerry Sievers <gsievers19(at)comcast(dot)net> writes:
> > Kevin Grittner <kgrittn(at)ymail(dot)com> writes:
> >> Jerry Sievers <gsievers19(at)comcast(dot)net> wrote:
> >>> Planning to pg_upgrade some large (3TB) clusters using hard link
> >>> method. Run time for the upgrade itself takes around 5 minutes.
> >>> Unfortunately the post-upgrade analyze of the entire cluster is going
> >>> to take a minimum of 1.5 hours running several threads to analyze all
> >>> tables. This was measured in an R&D environment.
>
> At least for some combinations of source and destination server
> versions, it seems like it ought to be possible for pg_upgrade to just
> move the old cluster's pg_statistic tables over to the new, as though
> they were user data. pg_upgrade takes pains to preserve relation OIDs
> and attnums, so the key values should be compatible. Except in
> releases where we've added physical columns to pg_statistic or made a
> non-backward-compatible redefinition of statistics meanings, it seems
> like this should Just Work. In cases where it doesn't work, pg_dump
> and reload of that table would not work either (even without the
> anyarray problem).

Yes, we could certainly do that, but since 9.2 creates an incremental
statistics build script, I need someone to say that is too slow before I
code up something more complex.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Anand Muthukrishnan 2013-07-24 11:11:07 Postgres schema having > 20,000 schemas
Previous Message Bruce Momjian 2013-07-23 23:47:06 Re: Dump/Reload pg_statistic to cut time from pg_upgrade?