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.