Re: Superuser

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Reinhard Hnat" <hnat(at)logotronic(dot)co(dot)at>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Superuser
Date: 2004-06-29 14:07:23
Message-ID: 28822.1088518043@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Reinhard Hnat" <hnat(at)logotronic(dot)co(dot)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

In response to

  • Superuser at 2004-06-29 09:02:45 from Reinhard Hnat

Browse pgsql-novice by date

  From Date Subject
Next Message Robert Antonio 2004-06-29 17:41:08 Postgres statement_timeout
Previous Message Nabil Sayegh 2004-06-29 09:36:25 Re: Superuser