Cannot create role, no default superuser role exists

Поиск
Список
Период
Сортировка
От Robert McAlpine
Тема Cannot create role, no default superuser role exists
Дата
Msg-id CACisWYEYWS0Ndn4c6nHqKfxBz1xBcYYwdwDgvY6G4HDW4nN0dA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Cannot create role, no default superuser role exists  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

Postgresql 9.5, Ubuntu 14.04.

I broke my ability to access postgres after attemping to install postgres-xc (ironic, since I installed that to use pg_ctl to reload my pg_hba.conf without restarting the entirety of postgres).

After doing so I can no longer access my databases via psql or any other utilities, getting the error:

FATAL:  role "postgres" does not exist

Unfortunately the same error gets thrown if I attempt to use 'createuser'.

The postgres user and role were the only ones able to access postgresql server, so altering the permissions in my pg_hba.conf also got me nowhere.

I made a complete copy of the data directory, took a snapshot (it is on a vm), then purged postgresql-9.5 and reinstalled, restoring to a dump that is a few days old. I thought about copying all the files from the data directory (except for the roles table file) into a fresh install with a correct default postgres role, but my gut tells me that screwing around with those files is doomed to fail.

I would appreciate any help or thoughts on how to recover access to the data.
--
Robert McAlpine

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

Предыдущее
От:
Дата:
Сообщение: Re: How to find configuration data in _PG_init()
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Cannot create role, no default superuser role exists