Re: select * and save into a text file failed

Поиск
Список
Период
Сортировка
От Lee Wu
Тема Re: select * and save into a text file failed
Дата
Msg-id E1F0E4D89D8FA44789DFC065C8E755281A360F@mxlhq-exch01.corp.mxlogic.com
обсуждение исходный текст
Ответ на select * and save into a text file failed  ("Lee Wu" <Lwu@mxlogic.com>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Lee Wu"
Дата:
Сообщение: Re: select * and save into a text file failed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: select * and save into a text file failed