Re: pg_upgrade and statistics

Kevin Grittner <kevin.grittner@wicourts.gov>

From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Bruce Momjian" <bruce@momjian.us>,"Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Daniel Farina" <daniel@heroku.com>, "pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2012-03-13T14:28:58Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> wrote:
 
> I just received a sobering blog comment stating that pg_upgrade
> took 5 minutes on a 0.5TB database, but analyze took over an hour:
 
Yeah, we have had similar experiences.  Even if this can't be done
for every release or for every data type, bringing over statistics
from the old release as a starting point would really help minimize
downtime on large databases.
 
Of course, release docs should indicate which statistics *won't* be
coming across, and should probably recommend a database ANALYZE or
VACUUM ANALYZE be done when possible.
 
-Kevin