Re: Out of Memory errors are frustrating as heck!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out of Memory errors are frustrating as heck!
Дата
Msg-id 19198.1555857403@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Out of Memory errors are frustrating as heck!  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: Out of Memory errors are frustrating as heck!  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Out of Memory errors are frustrating as heck!  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-performance
Jeff Janes <jeff.janes@gmail.com> writes:
> The growEnabled stuff only prevents infinite loops.  It doesn't prevent
> extreme silliness.

> If a single 32 bit hash value has enough tuples by itself to not fit in
> work_mem, then it will keep splitting until that value is in a batch by
> itself before shutting off

Right, that's the code's intention.  If that's not good enough for this
case, we'll need to understand the details a bit better before we can
design a better(?) heuristic.

I suspect, however, that we might be better off just taking the existence
of the I/O buffers into account somehow while deciding whether it's worth
growing further.  That is, I'm imagining adding a second independent
reason for shutting off growEnabled, along the lines of "increasing
nbatch any further will require an unreasonable amount of buffer memory".
The question then becomes how to define "unreasonable".

            regards, tom lane



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Out of Memory errors are frustrating as heck!
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Out of Memory errors are frustrating as heck!