Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Дата
Msg-id 20081216163936.C016.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1  (Emmanuel Cecchet <manu@frogthinker.org>)
Ответы Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1  (Emmanuel Cecchet <manu@frogthinker.org>)
Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Список pgsql-hackers
Emmanuel Cecchet <manu@frogthinker.org> wrote:

> I think there is a misunderstanding on how the trigger works. You have 1 
> trigger per child table and they are all chained on the parent table.

Oops, I misunderstand your patch, sorry.

> > Is it possible to expand all of child paritions from pg_inherits and
> > determine a suitable parition by checking their constraints?
> >   
> Ideally it would be better to do this way. I have not found yet how to 
> automatically get all the child partitions of a parent table from the 
> trigger. This would simplify things by having a single trigger.

The chained triggers would have better flexibilty, and the auto expanding
trigger would have better usability. I'm not sure about performance
because expanding child partitions is not always faster than chained
calls of triggers.

I think chained triggers are hard to maintain. If we drop one of partition
tables, we need to reconnect the single-linked-list of the triggers.


> > server says "INSERT 0 row" though rows are inserted into child tables.
> Technically this is correct since 0 rows were inserted in the parent 
> table.

Yes, but users expect non-0 result normally. Some O/R mapping tools
also checks the result exactly and raises errors (it could be turned
off, but default is on).

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Emmanuel Cecchet
Дата:
Сообщение: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Следующее
От: Emmanuel Cecchet
Дата:
Сообщение: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1