Discussion:
ERROR: must be superuser to alter superusers
(too old to reply)
Philippe Lang
18 years ago
Permalink
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:

ALTER ROLE pgsql
SUPERUSER;

... I get:

ERROR: must be superuser to alter superusers
SQL state: 42501

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


I tried:

CREATE ROLE pgsql2
SUPERUSER;

... But I get:

ERROR: must be superuser to create superusers
SQL state: 42501


Thanks,

Philippe Lang

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Scott Marlowe
18 years ago
Permalink
Post by Philippe Lang
Hi,
I had the very bad idea of removing the "superuser" flag from the
That's kind of the equivalent of locking your keys in the car...
Post by Philippe Lang
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.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly

Continue reading on narkive:
Loading...