Re: problems with moving a database

From: Oliver Kullmann <O(dot)Kullmann(at)Swansea(dot)ac(dot)uk>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: problems with moving a database
Date: 2003-05-14 10:23:54
Message-ID: 20030514102354.GA8077@swan.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, May 14, 2003 at 11:00:51AM +0530, A.Bhuvaneswaran wrote:
> Date: Wed, 14 May 2003 11:00:51 +0530 (IST)
> From: "A.Bhuvaneswaran" <bhuvansql(at)myrealbox(dot)com>
> X-X-Sender: bhuvan(at)Bhuvan(dot)bksys(dot)co(dot)in
> To: Oliver Kullmann <O(dot)Kullmann(at)Swansea(dot)ac(dot)uk>
> cc: pgsql-admin(at)postgresql(dot)org
> In-Reply-To: <20030513180758(dot)GB5534(at)swan(dot)ac(dot)uk>
> X-Reverse-DNS-Failure: 61.3.64.10
> Subject: Re: [ADMIN] problems with moving a database
> X-Spam-Status: No, hits=-9.7 required=8.0
> tests=IN_REP_TO,QUOTE_TWICE_1,USER_AGENT_PINE
> version=2.53
> X-Spam-Level:
> X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp)
>
> > pg_dump -a -R -O -x DB1
>
> Here pg_dump with -a, dumps only the data. Is it what you want?

yes; dumping the whole database does not work (lots of error messages)

> Does the
> database exist in machine 2?

yes, I recreated it from scratch;

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

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

--
-- Selected TOC Entries:
--
--
-- Data for TOC Entry ID 14 (OID 19638375)
--
-- Name: frames Type: TABLE DATA Owner: kullmann
--

-- Disable triggers
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'frames';

COPY "frames" FROM stdin;
1 {3} 1
2 {2,3} 2
\.
-- Enable triggers
UPDATE pg_class SET reltriggers = (SELECT count(*) FROM pg_trigger where pg_class.oid =
tgrelid) WHERE relname = 'frames';

What has this trigger bussiness to do with my database?
Is it not possible to back up a database as a normal user??

Any help is really appreciated (I definitely need to move
the database)!

Oliver

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message tlr 2003-05-14 13:06:22 download mirror :Cannot find server or DNS Error
Previous Message ivan 2003-05-14 09:55:38 qestion