Re: problems with moving a database

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Oliver Kullmann <O(dot)Kullmann(at)Swansea(dot)ac(dot)uk>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: problems with moving a database
Date: 2003-05-15 13:14:37
Message-ID: 1053004477.18699.19.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 2003-05-14 at 06:23, Oliver Kullmann wrote:
> On Wed, May 14, 2003 at 11:00:51AM +0530, A.Bhuvaneswaran wrote:
> >
> > >
> > > Now I get
> > >
> > > > psql -dDB2 -U oliver < DB1.dmp
> > > ERROR: pg_class: Permission denied.
> >
> > I highly suspect that it would be due to the non-super user trying to
> > access super user privileges.
>
> Both on my laptop and on the pc, "normal users" are the owners of the database,
> and they have all rights.
>
> > In your case, it would have happened like in
> > your laptop, the database owner is the super user and in your pc, the
> > database owner is not the super user. Check it. Note, pg_dump does update
> > pg_class to enable/disable the triggers.
>
> but I don't use any triggers?! The dump starts with

you do use triggers, you just don't realize it. postgresql is trying to
disables the foreign key triggers when you reimport the data, but your
user doesn't have access to the pg_* system tables, and so it is
generating an error " pg_class: Permission denied.". You need to either
make sure your user is a superuser, or drop the -x flag from your dump
command (note this might cause other issues)

Robert Treat

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sub Director - Sistemas Informáticos 2003-05-15 13:20:01 nested query too expensive
Previous Message Tom Lane 2003-05-15 13:08:18 Re: Running vacuum while executing the application