Skip site navigation (1) Skip section navigation (2)

Re: pg_upgrade and statistics

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Daniel Farina <daniel(at)heroku(dot)com>,Greg Stark <stark(at)mit(dot)edu>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_upgrade and statistics
Date: 2012-03-14 00:22:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Mar 13, 2012 at 05:33:29PM -0500, Kevin Grittner wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > What is the target=10 duration?  I think 10 is as low as we can
> > acceptably recommend.  Should we recommend they run vacuumdb
> > twice, once with default_statistics_target = 4, and another with
> > the default?
> Here are the results at various settings.
> 1   :  172198.892 ms
> 2   :  295536.814 ms
> 4   :  474319.826 ms
> 10  :  750458.312 ms
> 100 :  3433794.609 ms

Thanks, good numbers to know.

> I'm not sure what's best for a general approach to the problem.  For
> my own part, I'd be inclined to cherry-pick tables if I were in a
> hurry.
> I hope we at least bring over relpages and reltuples, to give the
> optimizer *some* clue what it's looking at.  I wouldn't thing those
> would be changing semantics or format very often.

True, but we don't migrate them either.

This is the exact same problem you would have restoring a pg_dump
backup.  The improvement needs to go into pg_dump, and then pg_upgrade
can make use of it.

Another idea is to just copy over pg_statistic like we copy of
pg_largeobject now, and force autovacuum to run.

  Bruce Momjian  <bruce(at)momjian(dot)us>

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

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2012-03-14 00:30:17
Subject: Re: pg_upgrade and statistics
Previous:From: Josh BerkusDate: 2012-03-13 23:53:53
Subject: Chronic performance issue with Replication Failover and FSM.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group