Re: problems with moving a database - Mailing list pgsql-admin

From A.Bhuvaneswaran
Subject Re: problems with moving a database
Date
Msg-id Pine.LNX.4.44.0305141054310.923-100000@Bhuvan.bksys.co.in
Whole thread Raw
In response to problems with moving a database  (Oliver Kullmann <O.Kullmann@Swansea.ac.uk>)
Responses Re: problems with moving a database
List pgsql-admin
> pg_dump -a -R -O -x DB1

Here pg_dump with -a, dumps only the data. Is it what you want? Does the
database exist in machine 2? If not, you should not use -a option. Rather,
use

$ pg_dump dbname -uf dbname.sql

which is enough to dump entire database.

>
> 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. 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.

regards,
bhuvaneswaran


pgsql-admin by date:

Previous
From: Travis Whitton
Date:
Subject: Grant Question
Next
From: Oliver Kullmann
Date:
Subject: Re: problems with moving a database