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

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Emmanuel Cecchet <manu(at)frogthinker(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Date: 2008-12-16 07:58:49
Message-ID: 20081216163936.C016.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Emmanuel Cecchet <manu(at)frogthinker(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emmanuel Cecchet 2008-12-16 08:19:31 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Previous Message Emmanuel Cecchet 2008-12-16 07:33:36 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1

Browse pgsql-patches by date

  From Date Subject
Next Message Emmanuel Cecchet 2008-12-16 08:19:31 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Previous Message Emmanuel Cecchet 2008-12-16 07:33:36 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1