Re: Superuser - Mailing list pgsql-novice

From Tom Lane
Subject Re: Superuser
Date
Msg-id 28822.1088518043@sss.pgh.pa.us
Whole thread Raw
In response to Superuser  ("Reinhard Hnat" <hnat@logotronic.co.at>)
List pgsql-novice
"Reinhard Hnat" <hnat@logotronic.co.at> writes:
> By mistake I took away superuser rights from my postgresql Admin. Any idea
> how to get  it back? There is no other superuser in the database.

Assuming you are running a reasonably recent Postgres (I am sure this
works in 7.3, don't recall about 7.2 or before):

1. Stop the postmaster.
2. Start a standalone backend (see the "postgres" man page for details).
3. Now you are effectively superuser.  ALTER USER to give your admin
   back superuserness, or just UPDATE his pg_shadow row if that seems
   easier.
4. Stop standalone backend, restart postmaster.

            regards, tom lane

pgsql-novice by date:

Previous
From: Nabil Sayegh
Date:
Subject: Re: Superuser
Next
From: Frank Kurzawa
Date:
Subject: Re: Committed updates don't seem to be committed.