Re: Need help - Unable to grant a role

From: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Need help - Unable to grant a role
Date: 2024-02-29 01:35:58
Message-ID: CAC5iy63OZNwXcyamx8N-AKaUxzwVbM+PqNZTmdAMzwA=7vWquA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thank you Erik!

Do we need to create hd*********' as both user and role?

Regards
Siraj

On Thu, Feb 29, 2024 at 6:58 AM Erik Wienhold <ewie(at)ewie(dot)name> wrote:

> 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
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2024-02-29 02:09:50 Re: Need help - Unable to grant a role
Previous Message Erik Wienhold 2024-02-29 01:28:29 Re: Need help - Unable to grant a role