From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Strange "permission denied" errors on pg_restore
Date: Sat, 29 Jun 2024 07:13:21 +0200
Message-ID: <42d837098e471906e23ed5ef345a1172145c76da.camel@cybertec.at> (raw)
In-Reply-To: <CANzqJaAVrQyJ_4ASm0PkmUQ7+U8PHKMTU4NAGFzM0w4FN5tDrQ@mail.gmail.com>
References: <CANzqJaBrzXfebHJaDLRWenr4WRgvRssTgEQR_O20N0sSv9MHLw@mail.gmail.com>
<792db007dcc03570743afee23aa0da830207f0cf.camel@cybertec.at>
<CANzqJaAVrQyJ_4ASm0PkmUQ7+U8PHKMTU4NAGFzM0w4FN5tDrQ@mail.gmail.com>
On Sat, 2024-06-29 at 01:04 -0400, Ron Johnson wrote:
> On Sat, Jun 29, 2024 at 12:31 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > On Fri, 2024-06-28 at 09:34 -0400, Ron Johnson wrote:
> > > pg_restore: error: COPY failed for table "batch_rp4_y2022m08": ERROR: permission denied for schema tapschema
> >
> > - Was the database you restored into totally empty?
> >
> > - What was the exact "pg_restore" command line?
>
> pg_restore -v --clean --create -Fd -j6 --dbname=postgres tap &> tap_restore.log
So the database was clean (newly created).
You should perform the restore as a superuser or as a user that has all
the required permissions. Restoring with a non-superuser can be tricky.
Yours,
Laurenz Albe
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: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Strange "permission denied" errors on pg_restore
In-Reply-To: <42d837098e471906e23ed5ef345a1172145c76da.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox