Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX9i8-0006Dm-28 for pgsql-admin@arkaria.postgresql.org; Thu, 04 Jan 2018 17:53:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX9i7-00019g-FU for pgsql-admin@arkaria.postgresql.org; Thu, 04 Jan 2018 17:53:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eX9i7-00019X-5g for pgsql-admin@lists.postgresql.org; Thu, 04 Jan 2018 17:53:47 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eX9i4-0006Ep-FG for pgsql-admin@lists.postgresql.org; Thu, 04 Jan 2018 17:53:45 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1eX9i2-0004sf-US; Thu, 04 Jan 2018 12:53:42 -0500 Date: Thu, 4 Jan 2018 12:53:42 -0500 From: Bruce Momjian To: =?iso-8859-1?B?TOlv?= FERLIN SUTTON Cc: pgsql-admin@lists.postgresql.org Subject: Re: Slow pg_dump affecting pg_upgrade speed Message-ID: <20180104175342.GA5478@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Dec 12, 2017 at 02:24:54PM +0100, Léo FERLIN SUTTON wrote: > We believe this is related to the size of our pg_catalog, we have > thousands (if not hundred of thousands of views) on most of our > databases. Here is an example on cluster A : ... > We are completely aware that this is a *bad* idea, and our newer I appreciate your candor. :-) > developments are all moving far far away for this type of schema, > however we are currently stuck with this for at least a few more > months if not years. > > My question to this mailing list is : Are we missing something that > could speed up the pg_dump ? There isn't much we can do to speed it up anymore. We optimized the schema restore in the past, at least with the ideas we had. A new idea we discussed last month was to allow the schema dump/restore while the old server is running. You can see the discussion here: https://www.postgresql.org/message-id/flat/20171205140135.GA25023%40momjian.us#20171205140135.GA25023@momjian.us That is only brainstorming at this point and it is not clear we will even implement it. The bottom line is that pg_upgrade is much more effective on large databases with a smaller number of database objects than the reverse. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +