Re: pg_restore 12 "permission denied for schema" errors - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_restore 12 "permission denied for schema" errors
Date
Msg-id 2980993.1666242738@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore 12 "permission denied for schema" errors  (Frank Gard <frank.von.postgresql.org@familie-gard.de>)
Responses Re: pg_restore 12 "permission denied for schema" errors
Re: pg_restore 12 "permission denied for schema" errors
List pgsql-general
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.

            regards, tom lane



pgsql-general by date:

Previous
From: Frank Gard
Date:
Subject: Re: pg_restore 12 "permission denied for schema" errors
Next
From: Bruno Wolff III
Date:
Subject: Re: Postgres 15 upgrades and template1 public schema