X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9E34E8B9EF6 for ; Thu, 3 Feb 2005 14:16:33 +0000 (GMT) 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 34410-04 for ; Thu, 3 Feb 2005 14:16:27 +0000 (GMT) Received: from lothos.nuvio.com (unknown [63.77.68.101]) by svr1.postgresql.org (Postfix) with ESMTP id 6CED68B9EF5 for ; Thu, 3 Feb 2005 14:16:29 +0000 (GMT) Received: from [63.77.68.30] ([63.77.68.30]) by lothos.nuvio.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 3 Feb 2005 08:18:26 -0600 In-Reply-To: <6725.1107379479@sss.pgh.pa.us> References: <74EFBC01-7557-11D9-AC7D-000D932ED682@nuvio.com> <6725.1107379479@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: multipart/alternative; boundary=Apple-Mail-13-283942377 Message-Id: <21AFCC70-75EE-11D9-AC7D-000D932ED682@nuvio.com> Cc: Postgres List From: Bradley Miller Subject: Re: pg_restore problem Date: Thu, 3 Feb 2005 08:16:01 -0600 To: Tom Lane X-Mailer: Apple Mail (2.619) X-OriginalArrivalTime: 03 Feb 2005 14:18:26.0062 (UTC) FILETIME=[39C59AE0:01C509FB] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.112 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/61 X-Sequence-Number: 20172 --Apple-Mail-13-283942377 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed So in the current version I'm running (7.4.6) and I do a pg_dump I have to then manually manipulate the order by doing a -l to get a table of contents and then reorder (just changing the first number; or the oid also??) just to get it to work right? Does anyone else have these issues? How exactly can I use this on a mission critical app with flaws like this? How do other people work with this? Do they just not dump the files and restore? On Feb 2, 2005, at 3:24 PM, Tom Lane wrote: > Bradley Miller writes: >> I'm attempting to restore a dump from one server to another (one is a >> Mac and one is a Linux base, if that makes any difference). I keep >> running into issues like this: > >> pg_restore: [archiver (db)] could not execute query: ERROR: function >> public.random_page_link_id_gen() does not exist > > Is this a problem of items in the dump being in the wrong order (ie, > there's a forward reference to random_page_link_id_gen())? > >> Any suggestions on how to get around this problem? > > Use 8.0 ... or use pg_restore's -L/-l options to manually adjust the > load order. Pre-8.0 versions of pg_dump are easily fooled if you use > ALTER to make earlier-created objects reference later-created objects. > > regards, tom lane > > Bradley Miller NUVIO CORPORATION Phone: 816-444-4422 ext. 6757 Fax: 913-498-1810 http://www.nuvio.com bmiller@nuvio.com --Apple-Mail-13-283942377 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII So in the current version I'm running (7.4.6) and I do a pg_dump I have to then manually manipulate the order by doing a -l to get a table of contents and then reorder (just changing the first number; or the oid also??) just to get it to work right? Does anyone else have these issues? How exactly can I use this on a mission critical app with flaws like this? How do other people work with this? Do they just not dump the files and restore? On Feb 2, 2005, at 3:24 PM, Tom Lane wrote: Bradley Miller < writes: I'm attempting to restore a dump from one server to another (one is a Mac and one is a Linux base, if that makes any difference). I keep running into issues like this: pg_restore: [archiver (db)] could not execute query: ERROR: function public.random_page_link_id_gen() does not exist Is this a problem of items in the dump being in the wrong order (ie, there's a forward reference to random_page_link_id_gen())? Any suggestions on how to get around this problem? Use 8.0 ... or use pg_restore's -L/-l options to manually adjust the load order. Pre-8.0 versions of pg_dump are easily fooled if you use ALTER to make earlier-created objects reference later-created objects. regards, tom lane Bradley Miller Arial1313,0000,FFFFNUVIO CORPORATIONArial Phone: 816-444-4422 ext. 6757 Fax: 913-498-1810 0000,0000,FFFFhttp://www.nuvio.com 0000,0000,FFFFbmiller@nuvio.com --Apple-Mail-13-283942377--