X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 26B9253584 for ; Tue, 5 Apr 2005 01:00:19 +0100 (BST) 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 17130-02 for ; Tue, 5 Apr 2005 00:00:15 +0000 (GMT) Received: from linuxworld.com.au (unknown [203.34.46.50]) by svr1.postgresql.org (Postfix) with ESMTP id DA40A5336B for ; Tue, 5 Apr 2005 01:00:13 +0100 (BST) Received: from linuxworld.com.au (IDENT:swm@localhost.localdomain [127.0.0.1]) by linuxworld.com.au (8.13.2/8.13.2) with ESMTP id j3500FTX020908; Tue, 5 Apr 2005 10:00:16 +1000 Received: from localhost (swm@localhost) by linuxworld.com.au (8.13.2/8.13.2/Submit) with ESMTP id j3500F1e020905; Tue, 5 Apr 2005 10:00:15 +1000 X-Authentication-Warning: linuxworld.com.au: swm owned process doing -bs Date: Tue, 5 Apr 2005 10:00:15 +1000 (EST) From: Gavin Sherry X-X-Sender: swm@linuxworld.com.au To: Steven Rosenstein Cc: pgsql-performance@postgresql.org Subject: Re: Bulk COPY end of copy delimiter In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/73 X-Sequence-Number: 11470 Hi, On Mon, 4 Apr 2005, Steven Rosenstein wrote: > > > > > Today while trying to do a bulk COPY of data into a table, the process > aborted with the following error message: > > ERROR: end-of-copy marker corrupt > CONTEXT: COPY tbl_logged_event, line 178519: "606447014,1492,2005-02-24 > 03:16:14,2005-02-23 20:27:48,win_applog,,error,adsmclientservice,nt > author..." > > Googling the error, we found reference to the '\.' (backslash-period) being > an "end-of-copy marker". Unfortunately, our data contains the > backslash-period character sequence. Is there any know fix or workaround > for this condition? Any sequence \. in COPY input data should be escaped as \\. If this data was generated by pg_dump then its a problem, but I haven't seen any other reports of this. Can I assume that you've generated the data for bulk load yourself? If so, there is discussion of escaping characters here: http://www.postgresql.org/docs/8.0/static/sql-copy.html. Gavin