Re: cache in plpgsql

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: cache in plpgsql
Дата
Msg-id
7004.1073064082@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
cache in plpgsql ivan <iv@psycho.pl>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql ivan <iv@psycho.pl>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql ivan <iv@psycho.pl>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql ivan <iv@psycho.pl>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: cache in plpgsql Karel Zak <zakkr@zf.jcu.cz>
Re: cache in plpgsql Jan Wieck <JanWieck@Yahoo.com>
Re: cache in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Jan Wieck  writes:
> Tom Lane wrote:
>> Another little problem is that plpgsql doesn't really have any mechanism
>> for invalidating cached stuff at all; it will leak memory like there's
>> no tomorrow if we start dropping cached subplans.

> Everyone seems to look at it as a PL/pgSQL specific problem. It is not!

No, of course not, but plpgsql has issues of its own that (IMHO) should
be solved along with the SPI-level problem.

> As said, the idea is neither bad, nor new. And please let's not forget 
> to add temp object detection into the dependency collector so that SPI 
> automagically will handle temp tables used in PL/pgSQL by NOT storing 
> prepared plans at all.

Why shouldn't we cache plans for temp tables?  They are good as long as
the temp table exists.  AFAICS the same dependency mechanism will work
fine for temp and regular tables.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: cache in plpgsql
От: Andrew Dunstan
Дата:
Сообщение: Re: PL/Java issues
FAQ