Re: Abnormally high memory usage/OOM triggered

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Abnormally high memory usage/OOM triggered
Дата
Msg-id 7976.1516297077@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Abnormally high memory usage/OOM triggered  (Davlet Panech <dpanech@gmail.com>)
Список pgsql-admin
Davlet Panech <dpanech@gmail.com> writes:
> On 1/17/2018 5:57 PM, scott ribe wrote:
>> It does seem awfully high, but... An update can involve a join across multiple tables. Or an update can run a
triggerwhich can cascade. Either of those could result in an "accidental cross product" join, which can always blow up
memory.


> There must be a way to put an upper limit on memory even for such cases.
> I was under the impression that parameters such as "work_mem" serve that
> purpose, is that not the case? So an "accidental cross product" join's
> memory usage is unbounded? It can't be... could somebody confirm this
> please?

A large join result could blow out memory on the client side, unless the
client is careful to read it in segments, which most clients aren't.
I expect the server to be smarter though.

            regards, tom lane


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

Предыдущее
От: scott ribe
Дата:
Сообщение: Re: Abnormally high memory usage/OOM triggered
Следующее
От: Keith
Дата:
Сообщение: Re: Abnormally high memory usage/OOM triggered