Re: Lost superuser login grant - Mailing list pgsql-admin

From Julien Rouhaud
Subject Re: Lost superuser login grant
Date
Msg-id 2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com
Whole thread Raw
In response to Lost superuser login grant  (Davide Toller <toller.davide@gmail.com>)
List pgsql-admin
On 20/10/2016 14:25, Davide Toller wrote:
> Hello to all,
> I made a mistake by revoking the grant login to my superuser "postgres".
>
> Now, when I try to access my database I get the following error:
>
> psql: FATAL:  role "postgres" is not permitted to log in
>
> I'm working with Postgres 9.3 on Red Hat 6.
> There is a way to give back the login grant to user "postgres"?
>

I think the only way is to stop postgres, and launch it in single user mode:

postgres --single -D /path/to/pgdata

Then you should be able to grant login privilege to your superuser.

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org


pgsql-admin by date:

Previous
From: Davide Toller
Date:
Subject: Lost superuser login grant
Next
From: Deepak Goel
Date:
Subject: Postgres and Ambari Error