Re: [BUGS] [pg_dump] not dumping some default privileges - Mailing list pgsql-bugs

From Feike Steenbergen
Subject Re: [BUGS] [pg_dump] not dumping some default privileges
Date
Msg-id CAK_s-G1qTz2PZV9J+mVPGtcmO-ANhzwOdhxB-sBtCfrps_7j+Q@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] [pg_dump] not dumping some default privileges  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [BUGS] [pg_dump] not dumping some default privileges  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs


On 23 October 2017 at 14:54, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> Reinier Haasjes wrote:
> > Hi,
> >
> > I noticed that pg_dump since 9.6 is missing some default privileges
> Hmm, I can confirm that 9.6 seems to have this problem while 9.5 does
> not seem to have it.  Must have been broken at some point during the
> extensive pg_dump patches in 9.6 ...  I'll give this a look.

in buildACLQueries there is a filter to exclude those acl's that match the pg_init_privs or default pg_catalog.acldefault for that role.

If I run the create_database.sql with a slightly altered GRANT section, pg_dump does return the actual DEFAULT PRIVILEGES for that role, these don't match the defaults.

-ALTER DEFAULT PRIVILEGES FOR ROLE bug IN SCHEMA public GRANT SELECT,INSERT,UPDATE,DELETE,TRUNCATE,REFERENCES,TRIGGER ON TABLES TO bug;
+ALTER DEFAULT PRIVILEGES FOR ROLE bug IN SCHEMA public GRANT SELECT,INSERT,UPDATE,DELETE,TRUNCATE,TRIGGER ON TABLES TO bug;

regards,

Feike

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] [pg_dump] not dumping some default privileges
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC callsvery much