Re: pg_restore 12 "permission denied for schema" errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Gard <frank(dot)von(dot)postgresql(dot)org(at)familie-gard(dot)de>
Cc: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore 12 "permission denied for schema" errors
Date: 2022-10-20 05:12:18
Message-ID: 2980993.1666242738@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Gard <frank(dot)von(dot)postgresql(dot)org(at)familie-gard(dot)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 into template1, 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2022-10-20 05:40:57 Re: Postgres 15 upgrades and template1 public schema
Previous Message Frank Gard 2022-10-20 05:03:00 Re: pg_restore 12 "permission denied for schema" errors