Re: Non existent user error on restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wbohl(at)deepdata(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Non existent user error on restore
Date: 2004-06-23 15:43:05
Message-ID: 2866.1088005385@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Werner Bohl <wbohl(at)deepdata(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-06-23 15:50:39 Re: Asunto: Re: Problems restoring a DB with oids
Previous Message Werner Bohl 2004-06-23 15:03:29 Non existent user error on restore