Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A0D5D9FA176 for ; Thu, 11 Jan 2007 23:28:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 45738-08 for ; Thu, 11 Jan 2007 23:27:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 04FBC9FA25B for ; Thu, 11 Jan 2007 23:28:02 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0C3Rdk3029962; Thu, 11 Jan 2007 22:27:39 -0500 (EST) To: "Jeanna Geier" cc: "pgsql-general" Subject: Re: RESTORE Error In-reply-to: References: Comments: In-reply-to "Jeanna Geier" message dated "Thu, 11 Jan 2007 15:43:01 -0600" Date: Thu, 11 Jan 2007 22:27:39 -0500 Message-ID: <29961.1168572459@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/619 X-Sequence-Number: 107159 "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