Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9C54164FC77 for ; Tue, 16 Dec 2008 03:13:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52589-09 for ; Tue, 16 Dec 2008 03:13:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound-mail-342.bluehost.com (outbound-mail-342.bluehost.com [66.147.249.3]) by mail.postgresql.org (Postfix) with SMTP id 475CA64FC2A for ; Tue, 16 Dec 2008 03:13:34 -0400 (AST) Received: (qmail 28906 invoked by uid 0); 16 Dec 2008 07:12:21 -0000 Received: from unknown (HELO fast22.fastdomain.com) (74.220.199.22) by outboundproxy7.bluehost.com.bluehost.com with SMTP; 16 Dec 2008 07:12:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=frogthinker.org; h=Received:Message-ID:Date:From:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=oLsE2YRySmpTTdBMvLWjhiW2St6SS0rIQyoUTpDxgGrWQELR+bf59CEvMcSikySGiVe+qir2H4XRa1jWNUXjQD8WBVYC74t1e/hGgzdIgjCOaw8bNcSN676F4L43ZRQA; Received: from 70.57.125.209.transedge.com ([209.125.57.70] helo=[10.2.23.198]) by fast22.fastdomain.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LCU7Z-0004wQ-F1; Tue, 16 Dec 2008 00:13:33 -0700 Message-ID: <49475519.9020000@frogthinker.org> Date: Tue, 16 Dec 2008 02:13:29 -0500 From: Emmanuel Cecchet Organization: Frog Thinker User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Nikhil Sontakke CC: Jaime Casanova , Gregory Stark , Josh Berkus , PostgreSQL-development Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 References: <3073cc9b0810220744y987173avd560a33fcb58ede5@mail.gmail.com> <3073cc9b0811270710p3a2e5ae9s10f66b529550c03e@mail.gmail.com> <3073cc9b0811270712l6384c28awac4f0318c704df99@mail.gmail.com> <492EC647.4090706@frogthinker.org> <603c8f070812021452m65ed412ckc416e14b8e8f3f77@mail.gmail.com> <493F1279.8010804@frogthinker.org> <49469894.4070406@agliodbs.com> <87abaxp97w.fsf@oxford.xeocode.com> <3073cc9b0812151101h3db74130xb5a808422e48c3f3@mail.gmail.com> <49470CDC.7020707@frogthinker.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {2846:fast22.fastdomain.com:frogthin:frogthinker.org} {sentby:smtp auth 209.125.57.70 authed with manu+frogthinker.org} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.41 tagged_above=0 required=5 tests=SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200812/1239 X-Sequence-Number: 129868 Nikhil Sontakke wrote: > A similar DELETE trigger should be pretty easy to write up in C. I > think the main challenge is with UPDATE triggers especially if the new > row will fall into another child table - but we can always throw an > error for such a case initially. I agree. A first implementation could be restricted to updates within the same partition. > > Right now if the row cannot be inserted in any child table, it is > inserted in the parent. If you want to fail, we can add a 'fail > trigger' (after all other triggers) that generates an error if > previous triggers did not capture the row. If you want to create a > new partition, you can have another trigger to handle that. > > > One of the work items related to partitioning eventually is to avoid > having to APPEND the parent in all queries involving children. Maybe > having an overflow child table might help to catch failed triggers for > those cases? This is a good option too. Emmanuel > > Regards, > Nikhils > > > > So I think that this trigger approach is pretty flexible like > people used AOP in J2EE servers to process requests. It has also > the advantage of allowing fast prototyping. It should also be easy > to push that functionality down in the core as needed. > > Is it ok if I move Simon's requirement document under a more > generic 'Table partitioning' page on the Wiki? > > Thanks for your feedback, > manu > > > Jaime Casanova wrote: > > On Mon, Dec 15, 2008 at 1:46 PM, Gregory Stark > > wrote: > > > Josh Berkus > > writes: > > > > Hackers, > > We don't yet seem to have a clear specification for > this feature, and the Other > Open Source DB has shown us how problematic it is to > get auto-partitioning > wrong. > > Should we defer auto-partitioning to 8.5? > > > If we're serious about having a "next generation" > partitioning with a concept > of partition keys then it seems to me to make more sense > to do that first and > then add on a feature like this. > > > > > +1 > > > > This is still very useful. I haven't looked at the actual > patch, does it > require core changes or can it be stashed in a pgfoundry > or contrib module? > > > > > what i don't like about this one is that it creates partitions at > create table time and to manually add all new partitions (inherit > tables and modify the trigger)... and what i want to see is an > automatic creation when it's needed... >