Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UwxXG-0001X7-BY for pgsql-admin@arkaria.postgresql.org; Wed, 10 Jul 2013 16:46:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UwxXF-00036E-Ox for pgsql-admin@arkaria.postgresql.org; Wed, 10 Jul 2013 16:46:33 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UwxXE-00034Y-4u for pgsql-admin@postgresql.org; Wed, 10 Jul 2013 16:46:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UwxXB-0003Nn-GC for pgsql-admin@postgresql.org; Wed, 10 Jul 2013 16:46:31 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r6AGkQMB026326; Wed, 10 Jul 2013 12:46:27 -0400 (EDT) From: Tom Lane To: Jerry Sievers cc: Bruce Momjian , Kevin Grittner , "pgsql-admin\@postgresql.org" Subject: Re: Dump/Reload pg_statistic to cut time from pg_upgrade? In-reply-to: <87r4f65sdm.fsf@comcast.net> References: <874nc4yi2b.fsf@comcast.net> <1373465348.51692.YahooMailNeo@web162906.mail.bf1.yahoo.com> <87r4f65sdm.fsf@comcast.net> Comments: In-reply-to Jerry Sievers message dated "Wed, 10 Jul 2013 10:47:33 -0500" Date: Wed, 10 Jul 2013 12:46:26 -0400 Message-ID: <26325.1373474786@sss.pgh.pa.us> X-Pg-Spam-Score: -0.3 (/) 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 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). regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin