Re: - Mailing list pgsql-admin

From Tom Lane
Subject Re:
Date
Msg-id 4931.995662104@sss.pgh.pa.us
Whole thread Raw
In response to ...  ("Fareed M. Zaffar" <fareed@cs.duke.edu>)
List pgsql-admin
"Fareed M. Zaffar" <fareed@cs.duke.edu> writes:
> i am sorry if this seems like a silly question but i managed to
> somehow remove the superuser priviliges from my super user...i was
> experimenting with pg_shadow and now i cant change it back. Is there a
> way to reassign superuser priviliges to a user since right now there
> is no one.

Oops :-(.  It *might* work to shut down the postmaster, start a
standalone backend, and do an UPDATE on pg_shadow in the standalone
backend.  I'm not sure whether the permission checks are disabled in
standalone mode (if not, perhaps they should be --- comments anyone?).

Otherwise, I think your choices are (a) hack the source code to let
you do the above, or (b) dump, initdb, reload.

            regards, tom lane

pgsql-admin by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Please help me
Next
From: Laurette Cisneros
Date:
Subject: error status 139