Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Date
Msg-id 20081216153856.C013.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1  (Emmanuel Cecchet <manu@frogthinker.org>)
Responses Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1  (Emmanuel Cecchet <manu@frogthinker.org>)
List pgsql-hackers
Emmanuel Cecchet <manu@frogthinker.org> wrote:

> In the meantime, I have made some more tests with the trigger in C (see 
> attached patch).

Hmm... The inserting partition is passed by trigger arguments.
Users must replace triggers when the target is changed (ex. every month).
Is it possible to expand all of child paritions from pg_inherits and
determine a suitable parition by checking their constraints?
We can also use it when there are multiple inserting paritions,
something like hash or list paritioning. Fixed target is only applicable
to time-based range paritioning.

BTW, there is another issue in trigger approach. If INSERT commands
are interrupted by triggers, server says "INSERT 0 row" though
rows are inserted into child tables. Since using C, we could
use some back doors to modify a variable counting affected rows.
We could use partitioned tables more transparently if we have it.

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




pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Function with defval returns error
Next
From: "Rushabh Lathia"
Date:
Subject: Re: Function with defval returns error