Thread: ...

...

From
"Fareed M. Zaffar"
Date:
hi,
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.


fareed

Re:

From
Tom Lane
Date:
"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