Re: cache in plpgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cache in plpgsql
Дата
Msg-id 14937.1073076321@sss.pgh.pa.us
обсуждение исходный текст
Ответ на cache in plpgsql  (ivan <iv@psycho.pl>)
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
> Tom Lane wrote:
>> No, of course not, but plpgsql has issues of its own that (IMHO) should
>> be solved along with the SPI-level problem.

> Not sure what you mean by that.

I'm referring to the fact that plpgsql's internal data structures are
all built with malloc and cannot be effectively reclaimed when the
function definition is invalidated.  I'd also like to get rid of its
ad-hoc method of detecting function definition changes (viz, looking
at the pg_proc row's xmin) in favor of hooking it into the same cache
invalidation mechanism as SPI would be using.

These are perhaps not essential changes, but they should happen
eventually.

>> 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.

> Good point. So you mean to call the SPI functionality to mark plans for 
> recompile at temp object destruction as well.

I think it would be difficult to avoid.  Temp objects are not very magic
in themselves, they just live in particular schemas that happen to be a
little bit magic.
        regards, tom lane


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: PL/Java issues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cache in plpgsql