Re: 7.3 : how add user when last user have lost 'createuser' option - Mailing list pgsql-sql

From Tom Lane
Subject Re: 7.3 : how add user when last user have lost 'createuser' option
Date
Msg-id 14692.1068326103@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.3 : how add user when last user have lost 'createuser' option  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-sql
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> alban wrote:
>> i have execute
>> ALTER USER postgres WITH NOCREATEUSER;

> Uh, you removed createuser permission from the postgres super-user.

That was a really bad move :-(

If you have no superusers left, I think your only option is to shut down
the postmaster, start a standalone backend, and ALTER USER postgres back
to superuser status in the standalone backend.  Then you can restart the
postmaster.

IIRC this will work in 7.3 and probably 7.2.  If you're running
something older, you are well and truly hosed, because you can't
reclaim superuser status even with a standalone backend.
        regards, tom lane


pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 7.3 : how add user when last user have lost 'createuser' option
Next
From: "Marc G. Fournier"
Date:
Subject: Re: off subject - pg web hosting