X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1654D52A15 for ; Tue, 19 Jul 2005 12:23:24 -0300 (ADT) 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 54593-07 for ; Tue, 19 Jul 2005 15:23:22 +0000 (GMT) Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by svr1.postgresql.org (Postfix) with ESMTP id 8052F52A14 for ; Tue, 19 Jul 2005 12:23:21 -0300 (ADT) Received: from [192.168.1.103] (cpe-024-211-165-134.nc.res.rr.com [24.211.165.134]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id j6JEbo528179; Tue, 19 Jul 2005 09:37:50 -0500 Message-ID: <42DD1AE6.6020204@dunslane.net> Date: Tue, 19 Jul 2005 11:23:18 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-1.3.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alon Goldshuv Cc: pgsql-patches@postgresql.org Subject: Re: COPY FROM performance improvements References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.04 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/377 X-Sequence-Number: 16717 Alon Goldshuv wrote: >I revisited my patch and removed the code duplications that were there, and >added support for CSV with buffered input, so CSV now runs faster too >(although it is not as optimized as the TEXT format parsing). So now >TEXT,CSV and BINARY are all parsed in CopyFrom(), like in the original file. > >Patch attached. > > > I do not have time to review this 2900 line patch analytically, nor to benchmark it. I have done some functional testing of it on Windows, and tried to break it in text and CSV modes, and with both Unix and Windows type line endings - I have not observed any breakage. This does need lots of eyeballs, though. cheers andrew