how to avoid that a postgres session eats up all the memory

Поиск
Список
Период
Сортировка
От Clemens Schwaighofer
Тема how to avoid that a postgres session eats up all the memory
Дата
Msg-id 497833A3.40706@tequila.jp
обсуждение исходный текст
Ответы Re: how to avoid that a postgres session eats up all the memory
Re: how to avoid that a postgres session eats up all the memory
Список pgsql-general
Hi,

I just literally trashed my test server with one delete statement
because the psql used up all its memory and started to swap like crazy.

my delete looked like this

DELETE FROM table_foo WHERE bar_id IN (SELECT DISTINCT bar_id FROM bar
LEFT JOIN ... LEFT JOIN ... LEFT JOIN .... WHERE  table.bar_id IS NULL
AND ...)

so basically it runs a select to see what entries do not have any
reference data and then should delete them all.

Now, my question is. How can I setup postgres to not use up all the
memory and then make the server useless. How can I set it up, so it dies
with "out of memory" before I have to restart the server.

--
[ Clemens Schwaighofer                      -----=====:::::~ ]
[ IT Engineer/Web Producer/Planning/Manager                  ]
[ E-Graphics Communications SP Digital                       ]
[                6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN ]
[ Tel: +81-(0)3-3545-7706            Fax: +81-(0)3-3545-7343 ]
[ http://www.e-gra.co.jp                                     ]

Вложения

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

Предыдущее
От: Kent Tong
Дата:
Сообщение: Re: how to specify the locale that psql uses
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: how to avoid that a postgres session eats up all the memory