pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Kullmann <O.Kullmann@Swansea.ac.uk>
To: pgsql-admin@postgresql.org
Subject: Re: problems with moving a database
Date: Wed, 14 May 2003 11:23:54 +0100
Message-ID: <20030514102354.GA8077@swan.ac.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0305141054310.923-100000@Bhuvan.bksys.co.in>
References: <20030513180758.GB5534@swan.ac.uk>
	<Pine.LNX.4.44.0305141054310.923-100000@Bhuvan.bksys.co.in>

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




view thread (5+ messages)  latest in thread

Message-ID: <20030514102354.GA8077@swan.ac.uk>
Permalink:  ../20030514102354.GA8077@swan.ac.uk/
Also on:    postgresql.org/message-id/20030514102354.GA8077@swan.ac.uk

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: O.Kullmann@Swansea.ac.uk
  Subject: Re: problems with moving a database
  In-Reply-To: <20030514102354.GA8077@swan.ac.uk>
  References: <20030513180758.GB5534@swan.ac.uk> <Pine.LNX.4.44.0305141054310.923-100000@Bhuvan.bksys.co.in> <20030514102354.GA8077@swan.ac.uk>

* 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