Re: ERROR: must be superuser to alter superusers

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Philippe Lang" <philippe(dot)lang(at)attiksystem(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: must be superuser to alter superusers
Date: 2007-09-24 12:40:05
Message-ID: dcc563d10709240540g7eecc79dx388b7ad34876600d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/24/07, Philippe Lang <philippe(dot)lang(at)attiksystem(dot)ch> wrote:
> Hi,
>
> I had the very bad idea of removing the "superuser" flag from the
> "pgsql" role. Now each time I try to set it back, with:

That's kind of the equivalent of locking your keys in the car...

> Since there is no superuser in the database engine anymore, what option
> do I have?

You have two choices.

1: re-initdb your database, losing everything
2: start your db in single user mode.

to start your db in single user mode, you need to su - to the postgres
superuser, then issue the command postgres --single. From there you
can then set a user back to being a superuser.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dawid Kuroczko 2007-09-24 12:44:32 DELETE FROM pg_class
Previous Message David Brain 2007-09-24 12:21:25 pg_dump problem: 'pg_dump: schema with OID 1515546 does not exist'