Re: Automatic function replanning

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Automatic function replanning
Дата
Msg-id 1134510550.15554.44.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Automatic function replanning  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: Automatic function replanning  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
On Tue, 2005-12-13 at 22:32 +0100, Joachim Wieland wrote:
> there's a topic that comes up from time to time on the lists, the problem
> that pgsql functions get planned only once and thereafter the same query
> plan is used until server shutdown or explicit recreation of the function.

The problem really has nothing to do with functions, per se: whenever a
plan is created and then stored for future use, the assumptions made by
that plan may be invalidated by the time the plan is executed. This
applies to PREPARE, pl/pgsql functions, perhaps the plan caching done by
the RI triggers, and so forth.

I also think that invalidating cached plans on a periodic basis is the
wrong approach -- we can use sinval to invalidate plans as soon as a
dependent database object changes and not before. This thread contains
some ideas on how to do this:
   http://archives.postgresql.org/pgsql-hackers/2005-03/msg00426.php

I got somewhat sidetracked by the complexities of the "central plan
caching module" that Tom would like to see, but I'm still hoping to take
a look at this for 8.2.

-Neil




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

Предыдущее
От: Joachim Wieland
Дата:
Сообщение: Automatic function replanning
Следующее
От: kbforge@kbforge.com
Дата:
Сообщение: New release: - kbforge 1.20 Free desktop search application with PGSQL database option