Re: Experience and feedback on pg_restore --data-only - Mailing list pgsql-general

From shammat@gmx.net
Subject Re: Experience and feedback on pg_restore --data-only
Date
Msg-id 317e02ed-1fa9-4adc-ad0c-f04184fee05b@gmx.net
Whole thread Raw
In response to Experience and feedback on pg_restore --data-only  (Dimitrios Apostolou <jimis@gmx.net>)
List pgsql-general
Dimitrios Apostolou schrieb am 20.03.2025 um 23:48:
> Things that made my life hard:
>
> * plenty of permission denials for both ALTER OWNER or SET SESSION
>   AUTHORIZATION (depending on command line switches).  Both of these
>   require superuser privilege, but in my case this is not really needed.
>   Dbowner has CREATEROLE and is the one who creates all the roles (WITH
>   SET TRUE), and their private schemata in the specific database.  Things
>   would work if pg_restore did "SET ROLE" instead of "SET SESSION
>   AUTHORIZATION" to switch user. Is this a straightforward change or there
>   are issues I don't see?

I think that can be avoided by using --no-owner and --no-privileges






pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Experience and feedback on pg_restore --data-only
Next
From: Dimitrios Apostolou
Date:
Subject: Re: Experience and feedback on pg_restore --data-only