Re: Partitions not Working as Expected

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partitions not Working as Expected
Дата
Msg-id 654.1372367875@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partitions not Working as Expected  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-performance
Andres Freund <andres@2ndquadrant.com> writes:
> Couldn't we at least significantly improve on the status quo by
> detecting we're currently planning a query that's only going to be
> executed once (because it's directly executed or because were planning a
> onetime plan for specific parameters) and inline stable functions before
> doing the theorem proving?

I think Haas went down that rabbit hole before you.  The current
definition of stable functions is not strong enough to guarantee that a
plan-time evaluation would give the same result as a run-time
evaluation, not even in one-shot-plan cases.  The obvious reason why not
is that the planner isn't using the same snapshot that the executor will
use (which is not that easy to change, see his failed patch from a year
or so back).  But even if we rejiggered things enough so the query did
use the same snapshot that'd been used for planning, I'm not very
convinced that such an assumption would be valid.  The assumptions for
stable functions are pretty weak really.

            regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Partitions not Working as Expected
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Partitions not Working as Expected