Re: Need help - Unable to grant a role - Mailing list pgsql-admin

From Erik Wienhold
Subject Re: Need help - Unable to grant a role
Date
Msg-id m23ob32czyg63mrkoxd2k6ofau5tdxmzpnceld4liv6awa762f@qji4huaze7h4
Whole thread Raw
In response to Need help - Unable to grant a role  (Siraj G <tosiraj.g@gmail.com>)
Responses Re: Need help - Unable to grant a role
List pgsql-admin
On 2024-02-29 02:06 +0100, Siraj G wrote:
> I have a PgSQL 15.4 database newly created. I created a user and is using
> it to restore a backup of another database, but unable to do so as it is
> failing with the below error:
> Error: role 'hd*********' does not exist.
> 
> I even tried to grant pg_read_system_files and pg_write_system_files roles,
> even then I am getting the same error.
> 
> Can someone please advise me on what I should do?

The error is pretty clear: you need to create that role first.

It probably stems from commands that try to change owners to that role
or grant privileges to it.  If you use pg_dump or pg_restore, you can
use options --no-acl and --no-owner to omit those commands if you don't
need them.

-- 
Erik



pgsql-admin by date:

Previous
From: Siraj G
Date:
Subject: Need help - Unable to grant a role
Next
From: Siraj G
Date:
Subject: Re: Need help - Unable to grant a role