From: | "Lee Wu" <Lwu(at)mxlogic(dot)com> |
---|---|
To: | "Steve Crawford" <scrawford(at)pinpointresearch(dot)com>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: select * and save into a text file failed |
Date: | 2005-06-10 17:03:56 |
Message-ID: | E1F0E4D89D8FA44789DFC065C8E755281A360E@mxlhq-exch01.corp.mxlogic.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
That is exactly what I did:
\o a_lot_room_to_hold_my_result
select * from a_table
either
1. out of memory for query result
2. killed
3. crash PG
"If you have a very large table you can exhaust memory on the client
side unless you are writing the data directly to a file."
How besides "\o" and pg_dump?
We have 4G RAM, and shared_buffers= 32768, it is a dedicate test box,
while the table is about 2G.
Thanks,
-----Original Message-----
From: Steve Crawford [mailto:scrawford(at)pinpointresearch(dot)com]
Sent: Friday, June 10, 2005 11:00 AM
To: Lee Wu; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] select * and save into a text file failed
On Friday 10 June 2005 9:33 am, Lee Wu wrote:
> Even without saving to file, it is still killed:
>...
> My_db=# select * from a_table;
> Killed
>...
The previous examples don't work for me. In psql try this:
--First set the output to a file
\o 'my_output.txt'
--Now run the query
select * from myfile;
--Quit and check your results
\q
If you have a very large table you can exhaust memory on the client
side unless you are writing the data directly to a file.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Lee Wu | 2005-06-10 17:05:31 | Re: select * and save into a text file failed |
Previous Message | Steve Crawford | 2005-06-10 16:59:36 | Re: select * and save into a text file failed |