Re: DO with a large amount of statements get stuck with high memory consumption

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: DO with a large amount of statements get stuck with high memory consumption
Дата
Msg-id 28143.1468849387@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: DO with a large amount of statements get stuck with high memory consumption  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: DO with a large amount of statements get stuck with high memory consumption  (Jan Wieck <jan@wi3ck.info>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> BTW, while the fix does address the cleanup performance issue, it's
> still the case that anonymous code blocks burn up lots of resident
> memory (my 315k example I tested with ate around 8gb IIRC) when run
> like this.  My question is, if the pl/pgsql code block is anonymous
> and not in some kind of a loop, why bother caching the plan at all?

Nobody got around to it.  Also, as you note, it's not as simple as
"don't cache if in a DO block".  You'd need to track whether you were
inside any sort of looping construct.  Depending on how difficult
that turned out to be, it might add overhead to regular functions
that we don't want.
        regards, tom lane



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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: DO with a large amount of statements get stuck with high memory consumption
Следующее
От: AMatveev@bitec.ru
Дата:
Сообщение: Re: One process per session lack of sharing