Re: pg_restore -L reordering of the statements does not work

Поиск
Список
Период
Сортировка
От Aditya D
Тема Re: pg_restore -L reordering of the statements does not work
Дата
Msg-id CAEATte71YkJWz=9FMfuWLtqG7_k7HrRpidvQonjWbrCxBk9-9w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_restore -L reordering of the statements does not work  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore -L reordering of the statements does not work  (Aditya D <dsaditya91@gmail.com>)
Список pgsql-admin
Thanks David and Tom. Yes, before restoring we are making all the roles member of <<user1>> but the grant is required since the scenario becomes very complicated.
Example, following are the steps -
* <<user1>> member of <<user2>>,<<user3>>,<<user4>>
* Restoring the dump file using list file with role <<user1>>
* alter schema schema1 owner to user2
* create table schema1.table1
* create table schema1.table2
* grant all on schema1 to user3
* alter table schema1.table1 to user2
* alter table schema1.table2 to user3

In the above scenario the grant statement for the schema to user3 has to be provided and is it possible via list file?

Regards,
Aditya D

On Sun, 29 Oct 2023 at 07:19, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sat, Oct 28, 2023, 18:37 Aditya D <dsaditya91@gmail.com> wrote:
>> PS: Don't have super user privileges on the target.

> Why can you not create a role on the target that is a member of every other
> role and thus can create and reassign delegated permissions and ownership
> to any of them.  In short, a role that behaves as superuser within this
> limited context even if they are not a true superuser.

That's going to be essential in any case if the restoring user is
to be able to successfully execute the ALTER OWNER commands in the
script.  You can't give away ownership to a role you don't have
the privileges of.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore -L reordering of the statements does not work
Следующее
От: Gambhir Singh
Дата:
Сообщение: Not able to grant role to User.