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

From Stephen Frost
Subject Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema accessprivileges.
Date
Msg-id 20170824142605.GD4628@tamriel.snowman.net
Whole thread Raw
In response to Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.
List pgsql-bugs
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> 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.

Ugh.

> 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.

I'm afraid it's not quite that simple, unfortunately.

I'll see what I can do though.  I'm really curious how this was working
previously..

Thanks!

Stephen

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.
Next
From: Masahiko Sawada
Date:
Subject: Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.