X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DEAFB52906 for ; Fri, 10 Jun 2005 12:40:01 -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 62560-02 for ; Fri, 10 Jun 2005 15:39:52 +0000 (GMT) Received: from mail.herbers.ca (unknown [64.56.146.199]) by svr1.postgresql.org (Postfix) with ESMTP id 9169C52822 for ; Fri, 10 Jun 2005 12:39:47 -0300 (ADT) Received: from localhost (unknown [127.0.0.1]) by mail.herbers.ca (herbers) with ESMTP id 630CD1EE1AE; Fri, 10 Jun 2005 09:39:46 -0600 (MDT) Received: from mail.herbers.ca ([127.0.0.1]) by localhost (trusty.herbers.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32325-09; Fri, 10 Jun 2005 09:39:42 -0600 (MDT) Received: from [10.1.2.50] (unknown [10.1.2.50]) by mail.herbers.ca (herbers) with ESMTP id BF01F1EE1A8; Fri, 10 Jun 2005 09:39:42 -0600 (MDT) Message-ID: <42A9B43F.3000108@herbers.ca> Date: Fri, 10 Jun 2005 09:39:43 -0600 From: James Herbers User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lee Wu Cc: pgsql-admin@postgresql.org Subject: Re: select * and save into a text file failed References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at herbers.ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.038 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/68 X-Sequence-Number: 17823 From a client machine try the program Aqua Data Studio (http://aquafold.com/) it has a nice export feature to export to text files. James Herbers Lee Wu wrote: > Hi, > > When I try to save a query result into a text file from “select * from > a_table”, once I got: > > out of memory for query result > > under psql > > Once got killed: > > My_db=# select * from a_table; > > Killed > > bash-2.05b$ > > And once it caused PG crashed. > > My PG version is: > > select version(); > > version > > ---------------------------------------------------------------------------------------------------------- > > PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 > 20030502 (Red Hat Linux 3.2.3-49) > > (1 row) > > The table has 6287585 rows, and takes 2805000 bytes. > > From the PG log, I can only find: > > could not send data to client: Connection reset by peer > > could not send data to client: Broken pipe > > unexpected EOF on client connection > > How can I save PG data into text file without using pg_dump? > > Thanks, > > PS: I know pg_dump, but it is not my option. >