From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Clean up some minor inefficiencies in parallel dump/restore.
Date: Wed, 01 Jun 2016 20:14:44 +0000
Message-ID: <E1b8CXM-0004FL-AW@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Clean up some minor inefficiencies in parallel dump/restore.
Parallel dump did a totally pointless query to find out the name of each
table to be dumped, which it already knows. Parallel restore runs issued
lots of redundant SET commands because _doSetFixedOutputState() was invoked
once per TOC item rather than just once at connection start. While the
extra queries are insignificant if you're dumping or restoring large
tables, it still seems worth getting rid of them.
Also, give the responsibility for selecting the right client_encoding for
a parallel dump worker to setup_connection() where it naturally belongs,
instead of having ad-hoc code for that in CloneArchive(). And fix some
minor bugs like use of strdup() where pg_strdup() would be safer.
Back-patch to 9.3, mostly to keep the branches in sync in an area that
we're still finding bugs in.
Discussion: <5086.1464793073@sss.pgh.pa.us>
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/0a1485f1c0e50796b3fec97229756035a6cf91c1
Modified Files
--------------
src/bin/pg_dump/parallel.c | 26 +-------------------------
src/bin/pg_dump/pg_backup_archiver.c | 18 +++++++-----------
src/bin/pg_dump/pg_dump.c | 32 +++++++++++++++++++++-----------
3 files changed, 29 insertions(+), 47 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Clean up some minor inefficiencies in parallel dump/restore.
In-Reply-To: <E1b8CXM-0004FL-AW@gemulon.postgresql.org>
References: <E1b8CXM-0004FL-AW@gemulon.postgresql.org>
* 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