From: Joshua D. Drake <jd@commandprompt.com>
To: Marc Fromm <Marc.Fromm@wwu.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: -O not working
Date: Thu, 24 Jul 2008 11:01:38 -0700
Message-ID: <1216922498.6858.54.camel@jd-laptop> (raw)
In-Reply-To: <B0D7C0A3F35FE144A70312D086CBCA9B0CF2B321@ExchMailbox2.univ.dir.wwu.edu>
References: <B0D7C0A3F35FE144A70312D086CBCA9B0CF2B321@ExchMailbox2.univ.dir.wwu.edu>
On Thu, 2008-07-24 at 10:20 -0700, Marc Fromm wrote:
> I backed up all my databases using:
> pg_dumpall -O -c -U postgres > /tmp/pgalldb2
> -O to remove owners on all objects
> -c to drop databases before recreating them during the restore to
> prevent duplicate records
>
> I restored all the databases with this command
> psql -U postgres -f /tmp/pgalldb2 postgres
>
> I tried to drop a user but was denied with the message, ". . . some
> objects depend on it."
>
> Why isn't the -O flag not removing the owner from all objects?
Your problem is likely the -c not the -O. In your target database you
have a role that owns objects. You can't drop a role if it owns objects.
Joshua D. Drake
>
> Marc
>
--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jd@commandprompt.com, Marc.Fromm@wwu.edu
Subject: Re: -O not working
In-Reply-To: <1216922498.6858.54.camel@jd-laptop>
* 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