From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hans Buschmann <buschmann@nidsa.net>
Cc: pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Subject: Re: Assorted improvements in pg_dump
Date: Sun, 24 Oct 2021 17:03:37 -0500
Message-ID: <20211024220337.GN9856@telsasoft.com> (raw)
In-Reply-To: <3780613.1635109855@sss.pgh.pa.us>
References: <7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc>
<3780613.1635109855@sss.pgh.pa.us>
On Sun, Oct 24, 2021 at 05:10:55PM -0400, Tom Lane wrote:
> 0003 is the same except I added a missing free().
>
> 0004 is a new patch based on an idea from Andres Freund [1]:
> in the functions that repetitively issue the same query against
> different tables, issue just one query and use a WHERE clause
> to restrict the output to the tables we care about. I was
> skeptical about this to start with, but it turns out to be
> quite a spectacular win. On my machine, the time to pg_dump
> the regression database (with "-s") drops from 0.91 seconds
> to 0.39 seconds. For a database with 10000 toy tables, the
> time drops from 18.1 seconds to 2.3 seconds.
+ if (tbloids->len > 1)
+ appendPQExpBufferChar(tbloids, ',');
+ appendPQExpBuffer(tbloids, "%u", tbinfo->dobj.catId.oid);
I think this should say
+ if (tbloids->len > 0)
That doesn't matter much since catalogs aren't dumped as such, and we tend to
count in base 10 and not base 10000.
BTW, the ACL patch makes the overhead 6x lower (6.9sec vs 1.2sec) for pg_dump -t
of a single, small table. Thanks for that.
--
Justin
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, buschmann@nidsa.net, andres@anarazel.de
Subject: Re: Assorted improvements in pg_dump
In-Reply-To: <20211024220337.GN9856@telsasoft.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