pgsql: pg_dump performance and other fixes

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_dump performance and other fixes
Date: 2016-05-06 18:06:59
Message-ID: E1ayk9T-0000Tm-2F@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump performance and other fixes

Do not try to dump objects which do not have ACLs when only ACLs are
being requested. This results in a significant performance improvement
as we can avoid querying for further information on these objects when
we don't need to.

When limiting the components to dump for an extension, consider what
components have been requested. Initially, we incorrectly hard-coded
the components of the extension objects to dump, which would mean that
we wouldn't dump some components even with they were asked for and in
other cases we would dump components which weren't requested.

Correct defaultACLs to use 'dump_contains' instead of 'dump'. The
defaultACL is considered a member of the namespace and should be
dumped based on the same set of components that the other objects in
the schema are, not based on what we're dumping for the namespace
itself (which might not include ACLs, if the namespace has just the
default or initial ACL).

Use DUMP_COMPONENT_ACL for from-initdb objects, to allow users to
change their ACLs, should they wish to. This just extends what we
are doing for the pg_catalog namespace to objects which are not
members of namespaces.

Due to column ACLs being treated a bit differently from other ACLs
(they are actually reset to NULL when all privileges are revoked),
adjust the query which gathers column-level ACLs to consider all of
the ACL-relevant columns.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5d589993cad212f7d556d52cc1e42fe18f65b057

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 188 +++++++++++++++++++++++++++++++++++++++-------
1 file changed, 159 insertions(+), 29 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-05-06 18:40:43 pgsql: Use mul_size when multiplying by the number of parallel workers.
Previous Message Peter Eisentraut 2016-05-06 18:02:57 pgsql: Update config.guess and config.sub