X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B6E65D1D5D9 for ; Tue, 6 Apr 2004 12:46:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05711-07 for ; Tue, 6 Apr 2004 12:45:57 -0300 (ADT) Received: from mta05-svc.ntlworld.com (mta05-svc.ntlworld.com [62.253.162.45]) by svr1.postgresql.org (Postfix) with ESMTP id 2D132D1CCDC for ; Tue, 6 Apr 2004 12:45:57 -0300 (ADT) Received: from evesham ([80.1.245.211]) by mta05-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with SMTP id <20040406154447.EPXS4091.mta05-svc.ntlworld.com@evesham>; Tue, 6 Apr 2004 16:44:47 +0100 From: "Marion McKelvie" To: "Tom Lane" Cc: Subject: Re: restoring large objects Date: Tue, 6 Apr 2004 16:46:11 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 In-Reply-To: <25098.1081265566@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/91 X-Sequence-Number: 13064 Tom Many thanks - you're right, the references are stored (by the application using the database) in a column of type text. That presumably means the only way I can get a reliably restorable dump is by writing something myself... or adding an extra duplicate column which is of type oid... or something which somehow tracks the old and new ids... an interesting challenge! Regards, Marion -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: 06 April 2004 16:33 To: Marion McKelvie Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] restoring large objects "Marion McKelvie" writes: > I am running with 7.1.2 (I know it's old, but I don't have a lot of choice > given the application running on it), and have dumped the database with > the -b option. However, the restoration process generates new ids for the > large objects which means the link between the data table referencing them > and the content of pg_largeobject is lost. pg_dump includes code in the dump that is supposed to update references to match the new large object OIDs. Check into why that didn't work for you. (One fairly likely possibility is that you stored the references in the wrong type of column --- it has to be type "oid" or "lo" or pg_dump won't think it needs updating.) regards, tom lane