From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Improving pg_dump performance
Date: Mon, 23 Jul 2018 02:23:45 -0500
Message-ID: <fecafc40-663d-cbd8-f1de-2201d3f84105@gmail.com> (raw)
Hi,
We've got an old (v8.4.17, thus no parallel backups) 2.9TB database that
needs to be migrated to a new data center and then restored to v9.6.9.
The database has many large tables full of bytea columns containing pdf
images, and so the dump file is going to be more than 2x larger than the
existing data/base...
The command is:
$ pg_dump -v -Z0 -Fc $DB --file=${TARGET}/${DATE}_${DB}.dump 2>
${DATE}_${DB}.log
Using -Z0 because pdf files are already compressed.
Because of an intricate web of FK constraints and partitioned tables, the
customer doesn't trust a set of "partitioned" backups using --table= and
regular expressions (the names of those big tables all have the year in
them), and so am stuck with a single-threaded backup.
Are there any config file elements that I can tweak (extra points for not
having to restart postgres) to make it run faster, or deeper knowledge of
how pg_restore works so that I could convince them to let me do the
partitioned backups?
Lastly, is there any way to not make the backups so large (maybe by using
the --binary-upgrade option, even though the man page says, "in-place
upgrades only")?
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com
Subject: Re: Improving pg_dump performance
In-Reply-To: <fecafc40-663d-cbd8-f1de-2201d3f84105@gmail.com>
References: <fecafc40-663d-cbd8-f1de-2201d3f84105@gmail.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