pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Error by restore a database
Date: Tue, 10 Sep 2013 10:03:20 -0700
Message-ID: <522F50D8.5030202@hogranch.com> (raw)
In-Reply-To: <42EBFBAC02A8479EBBC7D47042E08163@engineer>
References: <42EBFBAC02A8479EBBC7D47042E08163@engineer>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 9/9/2013 11:38 PM, Sbis-Partner wrote:
>
> When you restore a database error occurs
>
> «Pg_restore: creating TABLE dbschema
>
> pg_restore: [archiver (db)] Error from TOC entry 1428; 1259 83487 
> TABLE dbschema User
>
> pg_restore: [archiver (db)] could not execute query: ERROR: role 
> "User" does not exist
>
>      Command was: ALTER TABLE public.dbschema OWNER TO "User" ».
>
> Please help me to solve this problem.
>

users are not stored as part of a single database, they are global to 
the database cluster.      you need to create any users required by a 
given database before you can restore it.

CREATE USER "User" WITH PASSWORD 'somekindapassword';


Note the same is true for tablespaces, if you use those.

-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast

view thread (3+ messages)  latest in thread

Message-ID: <522F50D8.5030202@hogranch.com>
Permalink:  ../522F50D8.5030202@hogranch.com/
Also on:    postgresql.org/message-id/522F50D8.5030202@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: Error by restore a database
  In-Reply-To: <522F50D8.5030202@hogranch.com>
  References: <42EBFBAC02A8479EBBC7D47042E08163@engineer> <522F50D8.5030202@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox