X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 158BFD1B18F for ; Tue, 22 Jun 2004 14:15:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71423-03 for ; Tue, 22 Jun 2004 17:15:40 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4B338D1B170 for ; Tue, 22 Jun 2004 14:15:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5MHFZ7U019515; Tue, 22 Jun 2004 13:15:35 -0400 (EDT) To: juanmime@ono.com Cc: pgsql-admin@postgresql.org Subject: Re: Problems restoring a DB with oids In-reply-to: <40D7954B00000651@resmta01.ono.com> References: <40D7954B00000651@resmta01.ono.com> Comments: In-reply-to juanmime@ono.com message dated "Tue, 22 Jun 2004 16:32:18 +0200" Date: Tue, 22 Jun 2004 13:15:35 -0400 Message-ID: <19514.1087924535@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/290 X-Sequence-Number: 13950 juanmime@ono.com writes: > I do this, from Saturn: > pg_dump -Ft -b -U dbuser -h saturn dbsample > db.tar > Then, I create the user and database in Saturno, and perform this: > pg_restore -Ft -v db.tar -d dbsample -U dbuser > But, pg_restore stops, showing this message: > pg_restore: fixing large object cross-references for parts.qltymemdoc > pg_restore: [archiver (db)] error while updating column "qltymemdoc" of > table "parts": ERROR: large object 609937 does not exist > pg_restore: *** aborted because of error I think what is happening is that dbuser is not a superuser (correct?) and therefore is unable to disable triggers during the restore. But you have to disable the lo_manage trigger to avoid errors, because lo_manage will think it has to clean up the blob references in the existing data. In short: if you are using the LO type then blob restores have to be done as superuser. I suppose this oughta be documented someplace... regards, tom lane