Re: select * and save into a text file failed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lee Wu" <Lwu(at)mxlogic(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: select * and save into a text file failed
Date: 2005-06-10 16:55:07
Message-ID: 23616.1118422507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Lee Wu" <Lwu(at)mxlogic(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-06-10 16:57:59 Re: Indexes getting corrupted.
Previous Message Bruno G. Albuquerque 2005-06-10 16:42:31 Re: Indexes getting corrupted.