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 BD09DD1B73E for ; Wed, 23 Jun 2004 07:27:18 -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 10202-04 for ; Wed, 23 Jun 2004 10:27:20 +0000 (GMT) Received: from mta02.onolab.com (smtp.ono.com [62.42.230.12]) by svr1.postgresql.org (Postfix) with ESMTP id 7089AD1B737 for ; Wed, 23 Jun 2004 07:27:16 -0300 (ADT) Received: from [80.58.11.235] by mta02.onolab.com with HTTP; Wed, 23 Jun 2004 12:27:11 +0200 Date: Wed, 23 Jun 2004 12:27:11 +0200 Message-ID: <40D794F2000010BC@mta02.ono.com> In-Reply-To: <19514.1087924535@sss.pgh.pa.us> From: juanmime@ono.com Subject: Asunto: Re: Problems restoring a DB with oids To: "Tom Lane" Cc: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200406/302 X-Sequence-Number: 13962 >> 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... The problem continues I perform this: pg_restore -Ft -v db.tar -d test -U postgres -S postgres --disable-triggers And this is the result: 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 =BF Why ? I suppose that the triggers are disabled (-S postgres --disable-t= riggers), and I don't understand why pg_restore reports that "large object 609937 does not exist". Thank you.