Re: partitionning

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: partitionning
Дата
Msg-id 13974.1110688551@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: partitionning  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: partitionning  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> Note, the planner does have most of the intelligence needed to
> determine when it can skip a partition.

The issue isn't really whether the planner *could* use a constraint
to decide that a table need not be scanned at all.  As you say, we
have practically all the infrastructure needed for such inferences.
To me the real reason why we don't do that is the lack of a mechanism
to force the plan to be reconsidered if the constraint is dropped.
Without the constraint, the plan will still run, but it may deliver
wrong answers.  (The closest current equivalent is the possibility of
dropping an index that a plan depends on --- but at least we will fail
outright if the index isn't there anymore.)

In short, I won't accept any such patch until after we build a mechanism
for invalidating cached plans.  Which we need anyway for other reasons.
So the path ahead is clear, in my mind anyway ... but this is not the
next step to take.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Using sequence name depending on other column
Следующее
От: Ron Mayer
Дата:
Сообщение: Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. [final?]