From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Siraj G <tosiraj.g@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Need help - Unable to grant a role
Date: Thu, 29 Feb 2024 09:00:09 +0100
Message-ID: <cf66b06facd180dcf7aaf87ec744b95491d7541c.camel@cybertec.at> (raw)
In-Reply-To: <CAC5iy62S_j4km2cFtXUaoGGb6MqXhsZc_wYueRkCpxb9q5Lb_g@mail.gmail.com>
References: <CAC5iy62S_j4km2cFtXUaoGGb6MqXhsZc_wYueRkCpxb9q5Lb_g@mail.gmail.com>
On Thu, 2024-02-29 at 06:36 +0530, 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.
Users (= roles) are not part of the database dump, because they are not part
of the database.
Dump and restore the roles separately, *before* you restore the database.
You can dump the roles with "pg_dumpall -r".
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, tosiraj.g@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Need help - Unable to grant a role
In-Reply-To: <cf66b06facd180dcf7aaf87ec744b95491d7541c.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