Re: Proposal: Automatic partition creation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal: Automatic partition creation
Дата
Msg-id 1378901.1594051837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal: Automatic partition creation  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Proposal: Automatic partition creation  (Robert Haas <robertmhaas@gmail.com>)
Re: Proposal: Automatic partition creation  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jul 6, 2020 at 6:46 AM Anastasia Lubennikova
> <a.lubennikova@postgrespro.ru> wrote:
>> I am going to implement this via SPI, which allow to simplify checks and
>> calculations. Do you see any pitfalls in this approach?

> I don't really see why we need SPI here.

I would vote against any core facility that is implemented via SPI
queries.  It is just too darn hard to control the semantics completely in
the face of fun stuff like varying search_path.  Look at what a mess the
queries generated by the RI triggers are --- and they only have a very
small set of behaviors to worry about.  I'm still only about 95% confident
they don't have security issues, too.

If you're using SPI to try to look up appropriate operators, I think
the chances of being vulnerable to security problems are 100%.

> I think the big problem here is identifying the operator to use. We
> have no way of identifying the "plus" or "minus" operator associated
> with a datatype; indeed, that constant doesn't exist.

We did indeed solve this in connection with window functions, cf
0a459cec9.  I may be misunderstanding what the problem is here,
but I think trying to reuse that infrastructure might help.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Proposal: Automatic partition creation
Следующее
От: Thom Brown
Дата:
Сообщение: Multi-byte character case-folding