Re: Problem w/ dumping huge table and no disk space

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Problem w/ dumping huge table and no disk space
Дата
Msg-id 20010908190100.B17777@svana.org
обсуждение исходный текст
Ответ на Re: Problem w/ dumping huge table and no disk space  (David Ford <david@blue-labs.org>)
Список pgsql-general
On Sat, Sep 08, 2001 at 01:59:54AM -0400, David Ford wrote:
> On a side note (Tom, Bruce, etc), is there some way to mitigate psql's
> storage of all rows returned in memory?  Perhaps a 'swap' file?  If you
> connect to a 1.7G database and issue a query on it that returns a lot of
> rows, the entire thing is held in memory which with such a query is
> likely to cause an OOM and get killed.

psql does it because that's what the library does. I'm not sure if you can
get the library to return before all the rows have transferred. And if you
can someone needs to fix psql to use it.

pg_dump -d used to have this problem also but I recently submitted a patch
so that that doesn't happen anymore. I guess you could arrange for psql to
rewrite your SELECT statements to use a cursor but that may be unexpected...

--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

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

Предыдущее
От: Justin Clift
Дата:
Сообщение: Re: Idea: jobs.postgresql.org
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Abort state on duplicated PKey in transactions