Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.
Date
Msg-id 11976.1503584315@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.  (fujimoto@ceptord.net)
Responses Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema accessprivileges.
List pgsql-bugs
fujimoto@ceptord.net writes:
> [ dump to archive, then pg_restore with -c option ]

> Now all the access privileges on the public schema are gone:

I can confirm this is broken in HEAD: "pg_dump -c test >test.out"
produces a script including "GRANT ALL ON SCHEMA public TO PUBLIC",
but "pg_dump -Fc test >test.dump; pg_restore -c test.dump" produces
a script lacking that.

Stephen attempted to fix this in 330b84d8c, but the fix was evidently done
incorrectly.  There should never be any difference between the results of
these two procedures.  I've not studied 330b84d8c, but my strong suspicion
is that the logic was added to the wrong place in pg_dump.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: [BUGS] BUG #14790: pg_restore - segfault
Next
From: Stephen Frost
Date:
Subject: Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema accessprivileges.