Re: DO with a large amount of statements get stuck with high memory consumption
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: DO with a large amount of statements get stuck with high memory consumption |
| Дата | |
| Msg-id | 22342.1468852097@sss.pgh.pa.us обсуждение |
| Ответ на | Re: DO with a large amount of statements get stuck with high memory consumption (Merlin Moncure <mmoncure@gmail.com>) |
| Список | pgsql-hackers |
Merlin Moncure <mmoncure@gmail.com> writes:
> Hm, maybe, instead of trying to figure out if in a loop, set a
> 'called' flag with each statement and only cache when touched the
> second time. (If that's easier, dunno).
Well, then you just guarantee to lose once. I think Jan's sketch of
marking potentially-cacheable expressions at compile time sounds
promising. I'm envisioning a counter that starts at 1 normally or 0 in a
DO block, increment at beginning of parsing a loop construct, decrement at
end; then mark expressions/statements as cacheable if counter>0.
Of course the next question is what exactly to do differently for a
noncacheable expression. My recollection is that that's all tied
pretty tightly to the plancache these days, so it might take a little
work.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера