Re: leaky views, yet again

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: leaky views, yet again
Дата
Msg-id 28592.1286988763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: leaky views, yet again  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: leaky views, yet again  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Re: leaky views, yet again  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Re: leaky views, yet again  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Oct 13, 2010 at 11:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That's all true, but you have to consider how much the obstacle actually
>> gets in their way versus how painful it is on your end to create and
>> maintain the obstacle. �I don't think this proposed patch measures up
>> very well on either end of that tradeoff.

> I think it would behoove us to try to separate concerns about this
> particular patch from concerns about the viability of the whole
> approach.  Whether or not it's useful to do X is a different question
> than whether it can be done with few enough lines of code and/or
> whether this patch actually does it well.

I think I left the wrong impression: I'm concerned about the whole
approach.  I haven't even read this particular patch lately.  I think
that trying to guarantee that the planner applies independent
constraints in a particular order will be expensive, fragile, and prone
to recurring security bugs no matter how it's implemented --- unless you
do it by lobotomizing query pullup/pushdown, which seems unacceptable
from a performance standpoint.

Just to give one example of what this patch misses (probably; as I said
I haven't read it lately), what about selectivity estimation?  One of
the things we like to do when we have an otherwise-unknown function is
to try it on all the histogram members and see what percentage yield
true.  That might already represent enough of an information leak to be
objectionable ... and yet, if we don't do it, the consequences for
performance could be pretty horrid because we'll have to work without
any reasonable selectivity estimate at all.  There are cases where this
technique isn't applied at the moment but probably should be, which is
why I characterize the leak-prevention idea as creating future security
issues: doing that is a constraint that will have to be accounted for in
every future planner change, and we are certain to miss the implications
sometimes.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SQL command to edit postgresql.conf, with comments