Re: Experience and feedback on pg_restore --data-only

From: shammat(at)gmx(dot)net
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Experience and feedback on pg_restore --data-only
Date: 2025-03-24 15:51:28
Message-ID: 317e02ed-1fa9-4adc-ad0c-f04184fee05b@gmx.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitrios Apostolou 2025-03-24 15:51:30 Re: Experience and feedback on pg_restore --data-only
Previous Message Christoph Berg 2025-03-24 15:41:35 Re: query_id: jumble names of temp tables for better pg_stat_statement UX