Re: BUG #14788: `pg_restore -c` won't restore schema access privileges.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fujimoto(at)ceptord(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: BUG #14788: `pg_restore -c` won't restore schema access privileges.
Date: 2017-08-24 14:18:35
Message-ID: 11976.1503584315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

fujimoto(at)ceptord(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2017-08-24 14:26:05 Re: BUG #14788: `pg_restore -c` won't restore schema access privileges.
Previous Message Fabrízio de Royes Mello 2017-08-24 10:05:40 Re: BUG #14790: pg_restore - segfault