From: James Herbers <james@herbers.ca>
To: Lee Wu <Lwu@mxlogic.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: select * and save into a text file failed
Date: Fri, 10 Jun 2005 09:39:43 -0600
Message-ID: <42A9B43F.3000108@herbers.ca> (raw)
In-Reply-To: <E1F0E4D89D8FA44789DFC065C8E755281A360A@mxlhq-exch01.corp.mxlogic.com>
References: <E1F0E4D89D8FA44789DFC065C8E755281A360A@mxlhq-exch01.corp.mxlogic.com>
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.
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: james@herbers.ca, Lwu@mxlogic.com
Subject: Re: select * and save into a text file failed
In-Reply-To: <42A9B43F.3000108@herbers.ca>
References: <E1F0E4D89D8FA44789DFC065C8E755281A360A@mxlhq-exch01.corp.mxlogic.com> <42A9B43F.3000108@herbers.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox