Re: pg_restore: All GRANTs on table fail when any one role is missing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore: All GRANTs on table fail when any one role is missing
Дата
Msg-id 12529.1531433262@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore: All GRANTs on table fail when any one role is missing  (Moshe Jacobson <moshe@neadwerx.com>)
Ответы Re: pg_restore: All GRANTs on table fail when any one role is missing  (Moshe Jacobson <moshe@neadwerx.com>)
Список pgsql-bugs
Moshe Jacobson <moshe@neadwerx.com> writes:
> I take a backup using pg_dump -Fc, and then restore on the second cluster
> (where "user1" does not exist).
> The restore process says it ignored the error for the missing user, but the
> restored table now has no perms at all. Not even for user public.
> Examining pg_restore sql output shows two separate grant commands, however
> the problem persists even if I pipe pg_restore output into psql. Very
> strange.

Hm.  I can understand why this would happen if you do pg_restore direct to
the server: the GRANTs will all be part of the same "TOC entry" in the
dump file, and I'm pretty sure pg_restore issues the entire contents of
a TOC entry in one PQexec, so that it's effectively a single transaction.
However, if you tell pg_restore to emit text and then pass the text to
psql, each SQL command should be processed separately.  Are you sure about
the failure still occurring in that case?

            regards, tom lane


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Moshe Jacobson
Дата:
Сообщение: pg_restore: All GRANTs on table fail when any one role is missing
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices