Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwv53-0000QG-Nf for pgsql-admin@arkaria.postgresql.org; Wed, 10 Jul 2013 14:09:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Uwv52-0006tv-PU for pgsql-admin@arkaria.postgresql.org; Wed, 10 Jul 2013 14:09:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwv52-0006tp-0k for pgsql-admin@postgresql.org; Wed, 10 Jul 2013 14:09:16 +0000 Received: from nm33-vm5.bullet.mail.bf1.yahoo.com ([72.30.239.205]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwv4w-0001Za-AY for pgsql-admin@postgresql.org; Wed, 10 Jul 2013 14:09:15 +0000 Received: from [98.139.212.148] by nm33.bullet.mail.bf1.yahoo.com with NNFMP; 10 Jul 2013 14:09:08 -0000 Received: from [98.139.212.231] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 10 Jul 2013 14:09:08 -0000 Received: from [127.0.0.1] by omp1040.mail.bf1.yahoo.com with NNFMP; 10 Jul 2013 14:09:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 469881.70929.bm@omp1040.mail.bf1.yahoo.com Received: (qmail 52657 invoked by uid 60001); 10 Jul 2013 14:09:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1373465348; bh=+aY4hcUenygmsbwQKElUeX5e+sM4v+XCBJjzwy8jQh4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EzZmLgwNWyLnXdk52bHiJMOBedu2F5En408yhWFHZ/SlgWf5f6kKrOwEBx3KgE/90Ia0cVg/GdyUURMc+hsEfSrftApoSg7pXidDX3wckf9uVWtPMZSfM+qe/WztdNLWRT3Lr/bbIl63SG1ZkkMBsWUNwJnEjiTUKjw30UQuNmk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SgoqTzqlFiS27RGU8N/TWdxP3Yu6JrnZIEdXot6+VxsCfXeD3243ZnzGyGAJMdyOf7cXjNdANoae5yKfQfmQqVEOg++FiALkcluZMo7IgEr8ymCMTr+F6JFt8c8K1ws7i0zW5uNRh5tgijIcCSnVI3KkQZJVk5sJkJ4E1lEjS2I= ; X-YMail-OSG: nQPusiMVM1lyqv3HCrut.waGRR3CxRoZx1iXClS8Sd1.aKM 7lVvEQ_GsE1imP3k_2NqDU2d2uJpNu7.I_HIHcwq2a8UPww7Kn5Fn1NADiMM 1GQNkK9MitxzR1lwceBDY6zHAdxJrkzOr_w62CnovB3G4wku1wc93LPWyFik NdyiUR7sFNkFJ7vVxX3TcYEtI63w54A7odK.XzkvpEUSf3YEkvJRmtgJYIfR yguSlx8ESJrQNz9hUhrvjo6vz8OFTd1f0eGn_tBPYRCzmPJiZxRL5qm77n_8 N.e86PWxoe_CJLcsYHyYXxAUyOx9_ZmRqRMfeH5t_OeapcjwxkXXc0Lw2zlk ZY25uGGASwQOE6fhnhvUHmRceLhFhclN0N2VDXP2lbvJe4DjcYWKidQ8sj0i ttyJUZKmG0LjAGY_CCEU6GLJjsEJLbNdPk2aRVR1PihtD.AXRlC9kM4HFKnK IuBKTN6fJSV4qHRcB1Q47.4dBIZ8ucb3XrShbthxY4MNG3TL7RpWGld.ILEv 1dV3CY2u4h9emEkRqDpsPVWKEd328.l1J6PDcShC.KBn4bMNT5g_qRW3jksR f00XeeQNo6S9gnOUqWWW60AR_q6CJT7varJSKh_OUHpM31KZUqnoC3uqIXY4 iVyAgcLxzxQnc Received: from [76.255.18.237] by web162906.mail.bf1.yahoo.com via HTTP; Wed, 10 Jul 2013 07:09:08 PDT X-Rocket-MIMEInfo: 002.001, SmVycnkgU2lldmVycyA8Z3NpZXZlcnMxOUBjb21jYXN0Lm5ldD4gd3JvdGU6Cgo.IFBsYW5uaW5nIHRvIHBnX3VwZ3JhZGUgc29tZSBsYXJnZSAoM1RCKSBjbHVzdGVycyB1c2luZyBoYXJkIGxpbmsKPiBtZXRob2QuwqAgUnVuIHRpbWUgZm9yIHRoZSB1cGdyYWRlIGl0c2VsZiB0YWtlcyBhcm91bmQgNSBtaW51dGVzLgo.IE5pY2UhIcKgIE9yaWdpbiB2ZXJzaW9uIDguNCBhbmQgZGVzdGluYXRpb24gdmVyc2lvbiA5LjEuCj4KPiBVbmZvcnR1bmF0ZWx5IHRoZSBwb3N0LXVwZ3JhZGUgYW5hbHl6ZSBvZiB0aGUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.148.557 References: <874nc4yi2b.fsf@comcast.net> Message-ID: <1373465348.51692.YahooMailNeo@web162906.mail.bf1.yahoo.com> Date: Wed, 10 Jul 2013 07:09:08 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Dump/Reload pg_statistic to cut time from pg_upgrade? To: Jerry Sievers , "pgsql-admin@postgresql.org" In-Reply-To: <874nc4yi2b.fsf@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) 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 wrote: > Planning to pg_upgrade some large (3TB) clusters using hard link > method.=A0 Run time for the upgrade itself takes around 5 minutes. > Nice!!=A0 Origin version 8.4 and destination version 9.1. > > 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.=A0 This was measured in an R&D environment. > > Got to thinking, what if we make a SAN snapshot a few hours prior to > upgrade time, upgrade that... then analyze it and then dump the stats > table? > Has anyone else attempted anything similar?=A0 Any feedback is > appreciated. I certainly understand the motivation, and it may be a good option if you test carefully beforehand. What I have done in a similar situation, to minimize down time, is to run a database ANALYZE with a very small target.=A0 I forget the particular value we used -- it may have been 3.=A0 Then ran an ANALYZE with the normal default target on a few key tables (identified in testing to be the ones eating most of the scan time with no statistics), and let users in.=A0 The database ANALYZE with the normal default target was done while normal production hit the database, without too much of a performance hit.=A0 With this technique we were able to let users in with near-normal performance with 10 or 15 minutes of down time rather than hours. -- Kevin Grittner EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin