public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rachel Roch <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Pgsql General <[email protected]>
Subject: Re: pg_restore ERROR: permission denied to change default privileges
Date: Sat, 14 Jun 2025 10:42:59 +0200 (CEST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>




13 Jun 2025, 20:13 by [email protected]:

>
> To get at an editable script you can do something like:
>
> pg_restore -f my_database_txt.sql  my_database.dump
>
> This will give you a plain text version of the dump that you can feed back to psql to load into remote database.
>

Thanks Adrian !

I had thought maybe maybe I could do a "pg_restore -l my_database.dump" and ignore the relevant line using whatever the other flag is, but sadly there doesn't appear to be enough flexibility, i.e. 

pg_restore -l my_database.dump | fgrep -F postgres
gives:
2067; 826 16607 DEFAULT ACL public DEFAULT PRIVILEGES FOR TABLES postgres

But

pg_restore -l my_database.dump | fgrep -F my_database_ro
gives nothing.   :(

So either your solution or Tom's "just ignore it" sound like they'll work.






view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pg_restore ERROR: permission denied to change default privileges
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox