Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YvsrR-0008HU-EH for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 19:44:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YvsrQ-0001aj-Fj for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 19:44:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YvsrP-0001ab-PV for pgsql-bugs@postgresql.org; Fri, 22 May 2015 19:43:59 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YvsrM-0007w7-GB for pgsql-bugs@postgresql.org; Fri, 22 May 2015 19:43:58 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 9178D860001; Fri, 22 May 2015 21:43:54 +0200 (CEST) Date: Fri, 22 May 2015 21:43:52 +0200 From: Andres Freund To: Jeff Janes Cc: Stefan Seifert , Pg Bugs Subject: Re: pg_upgrade slowness for databases with many tables Message-ID: <20150522194352.GL2028@alap3.anarazel.de> References: <3559239.xQRrTQ2jGQ@sphinx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2015-05-22 12:34:54 -0700, Jeff Janes wrote: > On Fri, May 22, 2015 at 9:10 AM, Stefan Seifert wrote: > > upgrading a database containing > 90000 tables and about the same number of > > views and indexes with pg_upgrade takes several hours. I've started the > > upgrade more than five hours ago and the "Creating dump of database > > schemas" > > step is still not finished. > > The database is version 9.2, pg_upgrade is version 9.4.1. In a discussion > > at > > lwn.net I've been told, that 9.4.1 already contains fixes for > > inefficiencies > > and that it shouldn't be so slow anymore: http://lwn.net/Articles/645600/ > > > > What can I do to help improve pg_dump/pg_upgrade for my use case? > > > > Unfortunately the 9.4 version of pg_dump has to run against the 9.2 server, > where some of the improvements are not applicable. > > Your next upgrade should be much less painful. But unfortunately this one > will be slow. > > If it is intolerable, you could try to port > commit eeb6f37d89fc60c6449ca12ef9e into a custom build of 9.2. > > This is more a topic for the performance list than for bugs. I actually suggested -bugs... So that's my fault, if any. There've been a number of problems with the dependency code with a larger number of objects. It'd be interesting to see a profile of 9.2 while a pg_dump is running, to see what the problem is. Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs