Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1mJM-0008Kb-1D for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jul 2013 23:48:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1mJL-0004HC-7z for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jul 2013 23:48:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1mJH-0004CH-RA for pgsql-admin@postgresql.org; Tue, 23 Jul 2013 23:48:03 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1mJE-0004yZ-9P for pgsql-admin@postgresql.org; Tue, 23 Jul 2013 23:48:03 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1V1mJB-0006Bg-9v; Tue, 23 Jul 2013 19:47:57 -0400 Date: Tue, 23 Jul 2013 19:47:57 -0400 From: Bruce Momjian To: Tom Lane Cc: Jerry Sievers , Kevin Grittner , "pgsql-admin@postgresql.org" Subject: Re: Dump/Reload pg_statistic to cut time from pg_upgrade? Message-ID: <20130723234757.GB31462@momjian.us> References: <874nc4yi2b.fsf@comcast.net> <1373465348.51692.YahooMailNeo@web162906.mail.bf1.yahoo.com> <87r4f65sdm.fsf@comcast.net> <26325.1373474786@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <26325.1373474786@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Wed, Jul 10, 2013 at 12:46:26PM -0400, Tom Lane wrote: > Jerry Sievers writes: > > Kevin Grittner writes: > >> Jerry Sievers 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 http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin