Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 10D689FB3D0 for ; Fri, 12 Jan 2007 11:45:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 01735-02 for ; Fri, 12 Jan 2007 11:45:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from socrates.thinkhost.com (mailpipe.socrates.thinkhost.com [64.40.100.194]) by postgresql.org (Postfix) with ESMTP id 2E9EA9FB3F1 for ; Fri, 12 Jan 2007 11:45:32 -0400 (AST) Received: from geier (adsl-64-91-71-139-rb.lax.customer.centurytel.net [64.91.71.139]) by socrates.thinkhost.com (8.13.6/8.13.5) with SMTP id l0CFjBp2074544; Fri, 12 Jan 2007 10:45:12 -0500 (EST) (envelope-from jgeier@apt-cafm.com) From: "Jeanna Geier" To: "Tom Lane" Cc: "pgsql-general" Subject: Re: RESTORE Error Date: Fri, 12 Jan 2007 09:45:27 -0600 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) In-Reply-To: <29961.1168572459@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/656 X-Sequence-Number: 107196 Thanks for the reply, Tom. Yes, I had copied some data from a VIEW into a TABLE (named temp_measurement), then deleted the VIEW and renamed the TABLE, but must've created my script before performing the rename... And, yes, it was a Data-only restore. So, after recreating my scripts and creating my database and loading the data, it's FINALLY working (yeah)!! =) And, just for the record we're running version 8.0.8 of Postgres.. C:\Program Files\PostgreSQL\8.0\bin>psql --version psql (PostgreSQL) 8.0.8 Thanks for everyone's help throughtout the week working through the issues that I've had; you guys ROCK and the help is greatly appreciated! -Jeanna -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Tom Lane Sent: Thursday, January 11, 2007 9:28 PM To: Jeanna Geier Cc: pgsql-general Subject: Re: [GENERAL] RESTORE Error "Jeanna Geier" writes: > And log file shows the following (what I posted before was through pgAdmin): > 2007-01-11 15:38:47 ERROR: relation "temp_measurement" does not exist > 2007-01-11 15:38:47 ERROR: syntax error at or near "7094982" at character 1 > 2007-01-11 15:38:47 ERROR: syntax error at or near "67459" at character 1 OK, that makes it come a bit into focus. I think what pg_restore tried to send was COPY temp_measurement FROM STDIN; 7094982 ... rest of row 1 ... 67459 ... rest of row 2 ... and the COPY command failed because of the stated reason, and then the backend found itself chewing on a lot of data that was being sent as SQL commands (because back then pg_restore depended on feedback from the backend to tell whether an archive entry was COPY data or SQL commands). So the bottom line here is you're trying to restore into a table that's not there. How come? I suppose you were trying a data-only restore, else this is a pg_dump or pg_restore bug. Another point is that AFAICT 8.0 pg_restore does know enough to stop if the COPY command fails --- least the case seems to work for me. [ digs in CVS logs... ] Oh, it seems we fixed that in 8.0.7: 2006-02-05 15:59 tgl * src/bin/pg_dump/: pg_backup_archiver.c, pg_backup_archiver.h, pg_backup_db.c (REL8_0_STABLE): Fix pg_restore to properly discard COPY data when trying to continue after an error in a COPY statement. Formerly it thought the COPY data was SQL commands, and got quite confused. Stephen Frost So I suppose you're running some earlier 8.0.x subrelease, in which case an update would be an extremely good idea. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings