X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B1B6947658C for ; Wed, 14 May 2003 10:38:38 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 26921-07 for ; Wed, 14 May 2003 10:38:36 -0400 (EDT) Received: from mhs.swan.ac.uk (mhs.swan.ac.uk [137.44.1.33]) by postgresql.org (Postfix) with ESMTP id 7DD0A476745 for ; Wed, 14 May 2003 06:24:17 -0400 (EDT) Received: from cs-svr1.swan.ac.uk ([137.44.2.59]) by mhs.swan.ac.uk with esmtp (Exim 4.14) id 19FtQp-0002XD-6P; Wed, 14 May 2003 11:24:19 +0100 Received: from cspcok.swan.ac.uk (cspcok [137.44.2.97]) by cs-svr1.swan.ac.uk (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id h4EAOJVV031816; Wed, 14 May 2003 11:24:19 +0100 Received: from cspcok.swan.ac.uk (localhost [127.0.0.1]) by cspcok.swan.ac.uk (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h4EANsUw008187; Wed, 14 May 2003 11:23:54 +0100 Received: (from csoliver@localhost) by cspcok.swan.ac.uk (8.12.3/8.12.3/Submit) id h4EANsKd008186; Wed, 14 May 2003 11:23:54 +0100 Date: Wed, 14 May 2003 11:23:54 +0100 From: Oliver Kullmann To: pgsql-admin@postgresql.org Subject: Re: problems with moving a database Message-ID: <20030514102354.GA8077@swan.ac.uk> References: <20030513180758.GB5534@swan.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/167 X-Sequence-Number: 8729 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" > X-X-Sender: bhuvan@Bhuvan.bksys.co.in > To: Oliver Kullmann > 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