From: tony@exquisiteimages.com
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_dump of database with numerous objects
Date: Sun, 31 May 2020 13:06:08 -0400
Message-ID: <893c7614e433f17b4cb1d995989d463e@exquisiteimages.com> (raw)
In-Reply-To: <5c41043a-ad99-b1a4-32d3-204bedd06934@aklaver.com>
References: <6ef5dbeb1a02e0d01c5f085e4e49e496@exquisiteimages.com>
<5c41043a-ad99-b1a4-32d3-204bedd06934@aklaver.com>
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.
>>
>>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tony@exquisiteimages.com
Subject: Re: pg_dump of database with numerous objects
In-Reply-To: <893c7614e433f17b4cb1d995989d463e@exquisiteimages.com>
References: <6ef5dbeb1a02e0d01c5f085e4e49e496@exquisiteimages.com> <5c41043a-ad99-b1a4-32d3-204bedd06934@aklaver.com> <893c7614e433f17b4cb1d995989d463e@exquisiteimages.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox