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 1jfRPe-0007OU-9T for pgsql-general@arkaria.postgresql.org; Sun, 31 May 2020 17:06:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfRPb-0004g4-32 for pgsql-general@arkaria.postgresql.org; Sun, 31 May 2020 17:06:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfRPa-0004fw-Qn for pgsql-general@lists.postgresql.org; Sun, 31 May 2020 17:06:14 +0000 Received: from bay.acenet.us ([173.230.252.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfRPX-0001TV-BT for pgsql-general@lists.postgresql.org; Sun, 31 May 2020 17:06:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=exquisiteimages.com; s=default; h=Message-ID:References:In-Reply-To:Subject :To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MjGrt9bzMJTlZnAwbO/IdiSo4/2OHc9yBEFhGvtXxmk=; b=twcwVeKmKFNxEKEgPPcDt99cG7 Z4RTvZ2/Q18BnidamzprhmvXwCy1DDEaHFU6/2ioAhTQw+Ez1+abL1xrH9jVH2ra15vByWTYQnoMm Kvjapnq9bZVKyQygs1qQ53uBBduv6Aup94NRwfuRRGx5kvccY6Lh8oGNchpnBQ5HQuORWDVqy/8n6 G5sxpwVc1RMVmN0KXYyBh3ublD7Nj1/Hx8kefAF9qxcXgGbKl3OOoYk2lDfMeIPVGH/hwqHflFdd1 GZI6j092jkZlhEoLXSfzr9hdl4CC5rKydH+lze7QtW43dI3BTPhcj+6bOEOq0YKRrLgIyNh27x+h4 giUgJekw==; Received: from [::1] (port=33950 helo=bay.acenet.us) by bay.acenet.us with esmtpa (Exim 4.93) (envelope-from ) id 1jfRPV-00Awm3-1M for pgsql-general@lists.postgresql.org; Sun, 31 May 2020 13:06:10 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 31 May 2020 13:06:08 -0400 From: tony@exquisiteimages.com To: pgsql-general@lists.postgresql.org Subject: Re: pg_dump of database with numerous objects In-Reply-To: <5c41043a-ad99-b1a4-32d3-204bedd06934@aklaver.com> References: <6ef5dbeb1a02e0d01c5f085e4e49e496@exquisiteimages.com> <5c41043a-ad99-b1a4-32d3-204bedd06934@aklaver.com> Message-ID: <893c7614e433f17b4cb1d995989d463e@exquisiteimages.com> X-Sender: tony@exquisiteimages.com User-Agent: Roundcube Webmail/1.3.8 X-OutGoing-Spam-Status: No, score=5.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - exquisiteimages.com X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: tony@exquisiteimages.com X-Authenticated-Sender: bay.acenet.us: tony@exquisiteimages.com X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-05-31 11:24, Adrian Klaver wrote: > On 5/31/20 8:05 AM, tony@exquisiteimages.com wrote: >> I have always used pg_basebackup to backup my database and I have >> never had any issues. >> >> 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. > > Where you using the jobs option?: > > https://www.postgresql.org/docs/12/pgupgrade.html > > -j njobs > --jobs=njobs > > number of simultaneous processes or threads to use Yes, I did try with this option. It did dump the postgres database at the same time as my main database, but my database hung in the same place. > >> >> My pg_class table contains 9,000,000 entries and I have 9004 schema. >> >> I was able to get output from pg_dump if I used the -n option to dump >> schema with wildcards. I was able to use -n 'data???x' where x was a >> digit from 0 to 9. This way I was able to execute 10 concurrent >> pg_dump processes and dump the database in 30 minutes. I then dumped >> the public schema and used pg_dumpall to dump the globals. >> >> Can anyone tell me if there is something else I need to do to manually >> dump the database? What I did do seems to have restored correctly on >> the upgraded server, but if I want to make sure that I haven't missed >> anything that will creep up on me. >> >>