Re: pg_restore 12 "permission denied for schema" errors

From: Frank Gard <frank(dot)von(dot)postgresql(dot)org(at)familie-gard(dot)de>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore 12 "permission denied for schema" errors
Date: 2022-10-20 05:03:00
Message-ID: 40fd91d2-d981-2f44-4d58-a3f08a9448fb@familie-gard.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Ron,

Am 20.10.22 um 02:58 schrieb Ron:
> RDS Postgresql 12.11
>
> Backed up a database from one RDS instance, and now am trying to restore it to a new instance.  (If you're wondering why, it's to restore in an instance with less disk space.)
>
> Here are the commands:
>
> export PGHOST=${RDSENV}.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com
> cd /migrate/TASK001793786/2022-10-19b
> DB=sides
> 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? pg_restore's manpage says:

> […]
> -ddbname
> --dbname=dbname
>          Connect to database dbnameand restore directly into the database. The dbnamecan be a connection string. If so, connection string parameters will override any conflicting command line options.
> […] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And I'm wondering, if it's what you want. Possibly your errors could come from there…

Cheers,
Frank.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-10-20 05:12:18 Re: pg_restore 12 "permission denied for schema" errors
Previous Message Lists 2022-10-20 03:13:28 PG RPMS for RHEL 9 on aarch64?