Re: I slipped up so that no existing role allows connection. Is rescue possible?

Поиск
Список
Период
Сортировка
От Bryn Llewellyn
Тема Re: I slipped up so that no existing role allows connection. Is rescue possible?
Дата
Msg-id 4EC41A45-78DA-4CB6-B11D-33BCF8288FD9@yugabyte.com
обсуждение исходный текст
Ответ на Re: I slipped up so that no existing role allows connection. Is rescue possible?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: I slipped up so that no existing role allows connection. Is rescue possible?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
tgl@sss.pgh.pa.us wrote:

bryn@yugabyte.com writes:

Is rescue possible? Or must I simply remove my cluster and use "pg_ctl" to create a new one within my existing PG 14.5 software env?

Stop the cluster, start a single-user session ("postgres --single"), re-grant superuser to the postgres user and/or whatever else you wish you could take back, end that session, restart the cluster.

So nice to find this waiting for me when I got back to the keyboard after a late lunch. Thanks, Tom. And thanks to David, too who said much the same. I'll note how I spelled the magic—as a little memo for me:

postgres --single -D /usr/local/var/postgres postgres

The world that the "backend> " prompt opened up for me was rather basic. But even so, "alter user postgres with superuser" worked fine. (This was the only rescue that I needed.) And, after a normal restart, everything looks normal again now from the psql prompt.

This leads to some follow-up questions. But I'll start a new thread.

В списке pgsql-general по дате отправления:

Предыдущее
От: Dennis White
Дата:
Сообщение: GIST combo index condition chosen for users queries is different from table owner's query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GIST combo index condition chosen for users queries is different from table owner's query