Re: wrong search_path being used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: wrong search_path being used
Дата
Msg-id 22441.1358021631@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: wrong search_path being used  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: wrong search_path being used  (Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>)
Re: wrong search_path being used  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-bugs
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.

There's already infrastructure to save the search_path value for a plan,
but what it's being used for right now is to restore the first-plan-time
value of the path when a replan is forced for some other reason.  It
wouldn't be that hard to change it around to use it this way instead.

            regards, tom lane

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

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