pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Düster Horst <Horst.Duester@bd.so.ch>
Cc: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Re: Privileges where not restored
Date: Wed, 19 Jan 2005 21:07:07 -0700
Message-ID: <20050120040707.GA97306@winnie.fuhr.org> (raw)
In-Reply-To: <5B025B1F39D6D4119F5700508BEEEC66F94CB7@srsofaioi4546.ktso.ch>
References: <5B025B1F39D6D4119F5700508BEEEC66F94CB7@srsofaioi4546.ktso.ch>

On Wed, Jan 19, 2005 at 05:33:37PM +0100, Düster Horst wrote:

> I want to migrate a DB from PG 7.4.6 to PG 8.0.0. Thus I dumped a PG 7.4.6
> DB with the command
> 
> pg_dump -Fc -h host -U user dbname > db.dmp   (pg_dump Version (PostgreSQL)
> 8.0.0)
> 
> after the dump I create a TOC list file with
> 
> pg_restore -l db.dmp > db.lst                 (pg_restore Version
> (PostgreSQL) 8.0.0)
> 
> This step is nessesary to reorder the DB objects for correct import.

Are you sure reordering was necessary?  Did you try to restore
without reordering the objects?

> After reordering the DB objects I restore the DB with 
> pg_restore  -L db.lst -v db.dmp | psql -d db

You could also specify the database as an option to pg_restore and
skip piping the output into psql, unless perhaps you have a specific
reason for using psql.

> All DB objects where restored but not their user previleges.  

Hmmm...I see the same behavior.  The following restores objects
with their original permissions:

pg_restore -d testdb db.dump

The following restores objects without their permissions:

pg_restore -l db.dump > db.list
pg_restore -d testdb -L db.list db.dump

> I did the above described steps successful with PG 7.4.6. The listfile
> created with PG 7.4.6 shows many records with the ACL keyword. These records
> are missing in the PG 8.0.0 created listfile.

I see that as well; I'll mention it on pgsql-bugs.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (6+ messages)  latest in thread

Message-ID: <20050120040707.GA97306@winnie.fuhr.org>
Permalink:  ../20050120040707.GA97306@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050120040707.GA97306@winnie.fuhr.org

 · 

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-admin@postgresql.org
  Cc: mike@fuhr.org, Horst.Duester@bd.so.ch
  Subject: Re: Privileges where not restored
  In-Reply-To: <20050120040707.GA97306@winnie.fuhr.org>
  References: <5B025B1F39D6D4119F5700508BEEEC66F94CB7@srsofaioi4546.ktso.ch> <20050120040707.GA97306@winnie.fuhr.org>

* 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