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

From: "Nikhil Sontakke" <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Date: 2008-10-23 12:41:41
Message-ID: a301bfd90810230541h50fd7778q5f84498f7461b6f8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi,

On Wed, Oct 22, 2008 at 8:14 PM, Jaime Casanova <
jcasanov(at)systemguards(dot)com(dot)ec> wrote:

> just remembering that -patches is a dead list, so i'm sending this to
> -hackers where it will have more visibility...
>
> ---------- Forwarded message ----------
> On 10/22/08, Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com> wrote:
> > Hi,
> >
> > > >
> > > >> Thanks for taking a look. But if I am not mistaken Gavin and co. are
> > working
> > > >> on a much exhaustive proposal. In light of that maybe this patch
> might
> > not
> > > >> be needed in the first place?
> > > >>
> > > >> I will wait for discussion and a subsequent collective consensus
> here,
> > > >> before deciding the further course of actions.
> > > >
> > > > I think it is unwise to wait on Gavin for a more complex implemention
> > > > --- we might end up with nothing for 8.4. As long as your syntax is
> > > > compatible with whatever Gavin proposed Gavin can add on to your
> patch
> > > > once it is applied.
> > > >
> > >
> > > seems like you're a prophet... or i miss something?
> > >
> >
> > :)
> >
> > Maybe I will try to summarize the functionality of this patch, rebase it
> > against latest CVS head and try to get it on the commitfest queue atleast
> > for further feedback to keep the ball rolling on auto-partitioning...
> >
>
> yeah! i was thinking on doing that but still have no time... and
> frankly you're the best man for the job ;)
>
> one thing i was thinking of is to use triggers instead of rules just
> as our current docs recommends
> http://www.postgresql.org/docs/8.3/static/ddl-partitioning.html
>
> with the benefit that a trigger can check if the child table exists
> for the range being inserted and if not it can create it first...
> haven't looked at the code in the detail but seems that your patch is
> still missing the "create rule" part so we are in time to change
> that... no?
>

Yes triggers should be used instead of rules. Automatic generation of
rules/triggers would be kind of hard and needs some looking into. Also there
are issues like checking mutual exclusivity of the partition clauses
specified too (I have been maintaining that the onus of ensuring sane
partition ranges/clauses should rest with the users atleast initially..).

I will take a stab at this again whenever I get some free cycles.

Regards,
Nikhils
--
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-23 12:58:14 Re: EXPLAIN CREATE TABLE AS
Previous Message Simon Riggs 2008-10-23 11:56:09 Re: EXPLAIN CREATE TABLE AS

Browse pgsql-patches by date

  From Date Subject
Next Message Teodor Sigaev 2008-10-31 13:27:22 Re: [PATCHES] GIN improvements
Previous Message Emmanuel Cecchet 2008-10-22 21:49:53 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1