forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5d58999
committed
pg_dump performance and other fixes
Do not try to dump objects which do not have ACLs when only ACLs arebeing requested. This results in a significant performance improvementas we can avoid querying for further information on these objects whenwe don't need to.When limiting the components to dump for an extension, consider whatcomponents have been requested. Initially, we incorrectly hard-codedthe components of the extension objects to dump, which would mean thatwe wouldn't dump some components even with they were asked for and inother cases we would dump components which weren't requested.Correct defaultACLs to use 'dump_contains' instead of 'dump'. ThedefaultACL is considered a member of the namespace and should bedumped based on the same set of components that the other objects inthe schema are, not based on what we're dumping for the namespaceitself (which might not include ACLs, if the namespace has just thedefault or initial ACL).Use DUMP_COMPONENT_ACL for from-initdb objects, to allow users tochange their ACLs, should they wish to. This just extends what weare doing for the pg_catalog namespace to objects which are notmembers 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 ofthe ACL-relevant columns.1 parent64d60c8 commit5d58999
1 file changed
+159
-29
lines changed0 commit comments
Comments
(0)