Re: wrong search_path being used

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: wrong search_path being used
Дата
Msg-id 20130113201826.GA27004@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: wrong search_path being used  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: wrong search_path being used  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
On 2013-01-12 15:13:51 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2013-01-12 14:29:38 -0500, Tom Lane wrote:
> >> I think that the alternative most likely to succeed is to consider any
> >> change in the active value of search_path as forcing replanning of
> >> cached plans.
>
> > I guess it wouldn't really be feasible to keep the search path used to
> > plan a query in its cached form and check that it fits the one currently
> > used on every use of the cached plan?
>
> Actually that's exactly what I meant: every time we arrive at a query
> with a cached plan, check to see if the active search_path value is the
> same as what it was when we made the cached plan, and replan if not.

Okay. I was afraid it would add noticeable overhead to stuff like
plpgsql... Maybe would lower that by having a "search_path" generation
counter that gets increased everytime it gets changed but that seems a
bit too complicated.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Rodrigo Rosenfeld Rosas
Дата:
Сообщение: Re: wrong search_path being used
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: wrong search_path being used