"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