Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkANB-0006D6-Vl for pgsql-general@arkaria.postgresql.org; Sat, 13 Jun 2020 17:55:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkANA-0006s4-TL for pgsql-general@arkaria.postgresql.org; Sat, 13 Jun 2020 17:55:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkANA-0006rx-Lz for pgsql-general@lists.postgresql.org; Sat, 13 Jun 2020 17:55:16 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkAN7-0008Jq-SZ for pgsql-general@lists.postgresql.org; Sat, 13 Jun 2020 17:55:16 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jkAN5-0000lM-73; Sat, 13 Jun 2020 13:55:11 -0400 Date: Sat, 13 Jun 2020 13:55:11 -0400 From: Bruce Momjian To: Alvaro Herrera Cc: tony@exquisiteimages.com, pgsql-general@lists.postgresql.org Subject: Re: pg_dump of database with numerous objects Message-ID: <20200613175511.GA20552@momjian.us> References: <6ef5dbeb1a02e0d01c5f085e4e49e496@exquisiteimages.com> <20200603201055.GA30037@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200603201055.GA30037@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jun 3, 2020 at 04:10:55PM -0400, Alvaro Herrera wrote: > On 2020-May-31, tony@exquisiteimages.com wrote: > > > I am now needing to upgrade to a new version of PostgreSQL and I am running > > into problems when pg_upgrade calls pg_dump. pg_dump stalled at: "pg_dump: > > saving database definition" for 24 hours before I killed the process. > > > > My pg_class table contains 9,000,000 entries and I have 9004 schema. > > We've made a number of performance improvements to pg_dump so that it > can dump databases that are "large" in several different dimensions, but > evidently from your report it is not yet good enough when it comes to > dumping millions of tables in thousands of schemas. It will probably > take some profiling of pg_dump to figure out where the bottleneck is, > and some careful optimization work in order to make it faster. Not a > weekend job, I'm afraid :-( FYI, we never actually found what version of pg_dump was being used, since pg_upgrade uses the pg_dump version in the newer cluster. We only know the user is coming _from_ 9.3. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee