Обсуждение: pg_dump dumping out some irrelevant grants

Поиск
Список
Период
Сортировка

pg_dump dumping out some irrelevant grants

От
Chris Browne
Дата:
I'm finding that pg_dumps are dumping out, right near the end, the
following sequence of grants that are causing our QA folk a little bit
of concern:

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM chris;
GRANT ALL ON SCHEMA public TO chris;
GRANT ALL ON SCHEMA public TO PUBLIC;

The problem isn't anything terribly deep - it's just that there is no
user "chris" in their environment (chris happens to be one of the
superuser accounts on my workstation ;-)), so that the REVOKE/GRANT
combination raises errors.

Note that:
 - I used the "postgres" superuser for anything needing superuserness
 - I decline to use "sed" to filter this out; see the .sig ;-)

Is this an artifact of the fact that "chris" is the 'base superuser'?
--
output = ("cbbrowne" "@" "linuxfinances.info")
http://cbbrowne.com/info/postgresql.html
"Some people, when confronted with a Unix problem, think ‘I know, I’ll
use sed.’ Now they have two problems."  - jwz@lucid.com

Re: pg_dump dumping out some irrelevant grants

От
Tom Lane
Дата:
Chris Browne <cbbrowne@acm.org> writes:
> I'm finding that pg_dumps are dumping out, right near the end, the
> following sequence of grants that are causing our QA folk a little bit
> of concern:

> REVOKE ALL ON SCHEMA public FROM PUBLIC;
> REVOKE ALL ON SCHEMA public FROM chris;
> GRANT ALL ON SCHEMA public TO chris;
> GRANT ALL ON SCHEMA public TO PUBLIC;

> Is this an artifact of the fact that "chris" is the 'base superuser'?

Yup.  If you're restoring into a system with a different base superuser
name, you'll just have to ignore those errors.

            regards, tom lane