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@myrealbox.com>
> X-X-Sender: bhuvan@Bhuvan.bksys.co.in
> To: Oliver Kullmann <O.Kullmann@Swansea.ac.uk>
> cc: pgsql-admin@postgresql.org
> In-Reply-To: <20030513180758.GB5534@swan.ac.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