pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedError by restore a database
3+ messages / 3 participants
[nested] [flat]
* Error by restore a database
@ 2013-09-10 06:38 Sbis-Partner <sbis-partner@mail.ru>
0 siblings, 2 replies; 3+ messages in thread
From: Sbis-Partner @ 2013-09-10 06:38 UTC (permalink / raw)
To: pgsql-bugs
Hello!
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Error by restore a database
@ 2013-09-10 17:03 John R Pierce <pierce@hogranch.com>
parent: Sbis-Partner <sbis-partner@mail.ru>
1 sibling, 0 replies; 3+ messages in thread
From: John R Pierce @ 2013-09-10 17:03 UTC (permalink / raw)
To: pgsql-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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Error by restore a database
@ 2013-09-11 13:08 Michael Paquier <michael.paquier@gmail.com>
parent: Sbis-Partner <sbis-partner@mail.ru>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2013-09-11 13:08 UTC (permalink / raw)
To: Sbis-Partner <sbis-partner@mail.ru>; +Cc: pgsql-bugs
On Mon, Sep 9, 2013 at 11:38 PM, Sbis-Partner <sbis-partner@mail.ru> wrote:
> Hello!
>
> 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" ».
User and group information are missing in your dump, this information
can be retrieved with pg_dumpall. There are two possibilities in your
case:
- Use the dump you created previously and complete it with data from
pg_dumpall --globals-only containing only user and tablespace
information
- Use a global dump with pg_dumpall with the user information as well
as the database
The latter solution is more instinctive IMO, but the former solution
will work fine as well.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2013-09-11 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 06:38 Error by restore a database Sbis-Partner <sbis-partner@mail.ru>
2013-09-10 17:03 ` John R Pierce <pierce@hogranch.com>
2013-09-11 13:08 ` Michael Paquier <michael.paquier@gmail.com>
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