Which memory are you refer Tom?
shared_buffers= 32768
and RAM is 4G while the table is about 2G.
Why straight "select * from" need so big memory?
From top, I did not see the process eating a lot of memory.
From vmstat, I did not see any swaping.
It is a dedicate test box, with only PG running.
Thanks Tom,
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, June 10, 2005 10:55 AM
To: Lee Wu
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] select * and save into a text file failed
"Lee Wu" <Lwu@mxlogic.com> writes:
> My_db=3D# select * from a_table;
> Killed
Apparently the table is bigger than psql can hold in memory?
The simplest way to do this is certainly to use pg_dump in one-table
mode. If you're intent on using psql, you could use a cursor or
OFFSET/LIMIT to fetch part of the table at a time.
regards, tom lane