Re: Non existent user error on restore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Non existent user error on restore
Дата
Msg-id 2866.1088005385@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Non existent user error on restore  (Werner Bohl <wbohl@deepdata.com>)
Список pgsql-admin
Werner Bohl <wbohl@deepdata.com> writes:
> pg_restore: [archiver (db)] could not execute query: ERROR: user "100"
> does not exist

I'd suggest doing a plain text schema-only dump (pg_dump -s) and looking
through it for references to userid 100.  You have presumably got some
objects in the database that are owned by a now-gone user.  Fixing their
ownership would be the best long-term solution.

> Created a user with:
>   createuser -i 100 dropme
> Run the restore again, but gave same error!

I think you'd actually need "createuser 100", ie, the name not the sysid
is what's being complained of above.  It might be prudent to give it
sysid 100 as well, though.

            regards, tom lane

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

Предыдущее
От: Werner Bohl
Дата:
Сообщение: Non existent user error on restore
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Asunto: Re: Problems restoring a DB with oids