Re: pg_restore 12 "permission denied for schema" errors

Поиск
Список
Период
Сортировка
От Ron
Тема Re: pg_restore 12 "permission denied for schema" errors
Дата
Msg-id d073e1ec-86f4-19c7-206e-c76ad9792bdc@gmail.com
обсуждение исходный текст
Ответ на Re: pg_restore 12 "permission denied for schema" errors  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore 12 "permission denied for schema" errors  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On 10/20/22 00:12, Tom Lane wrote:
> Frank Gard <frank.von.postgresql.org@familie-gard.de> writes:
>> Am 20.10.22 um 02:58 schrieb Ron:
>>> pg_restore -v --create --clean --jobs=`nproc` -Fd --dbname=template1 $DB
>> What database do you want to restore your data into? As far as I know your pg_restore command would import the data
intotemplate1, right?
 
> No --- my ears went up about that too, but he's using --create.
> So template1 is just the springboard for the initial connection
> in which CREATE DATABASE will be issued.
>
> My guess is that there's something inconsistent between source
> and target installations about roles and role-privilege grants.
> We don't have enough details to do more than guess, though.

I ran "pg_dumpall --globals-only --no-role-passwords" on the source 
instance, and applied it to the new instance before doing the pg_restore.  
If I hadn't done that, pg_restore would have thrown errors on all the GRANT 
and ALTER TABLE ... OWNER TO statements embedded in the backup.

-- 
Angular momentum makes the world go 'round.



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

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: Re: How to store "blobs" efficiently for small and large sizes, with random access
Следующее
От: Luca Ferrari
Дата:
Сообщение: MERGE output doubt