Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3167C64FC2F for ; Thu, 6 Nov 2008 00:47:31 -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 45769-08 for ; Thu, 6 Nov 2008 00:47:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by mail.postgresql.org (Postfix) with ESMTP id A039E64FD69 for ; Thu, 6 Nov 2008 00:47:30 -0400 (AST) Received: by rv-out-0506.google.com with SMTP id b25so392210rvf.43 for ; Wed, 05 Nov 2008 20:47:29 -0800 (PST) Received: by 10.140.172.21 with SMTP id u21mr916885rve.177.1225946849403; Wed, 05 Nov 2008 20:47:29 -0800 (PST) Received: by 10.141.128.5 with HTTP; Wed, 5 Nov 2008 20:47:29 -0800 (PST) Message-ID: <3073cc9b0811052047o4ebe24b4vd0ab24fd3095d342@mail.gmail.com> Date: Thu, 6 Nov 2008 05:47:29 +0100 From: "Jaime Casanova" To: "Emmanuel Cecchet" Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 Cc: "Nikhil Sontakke" , PostgreSQL-development In-Reply-To: <490B5178.7070600@frogthinker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200803211518.m2LFIfJ12397@momjian.us> <3073cc9b0810181308y91deed8wac2df9bc925200f5@mail.gmail.com> <3073cc9b0810220743p11526a74ve9769a416c1707cf@mail.gmail.com> <3073cc9b0810220744y987173avd560a33fcb58ede5@mail.gmail.com> <490B5178.7070600@frogthinker.org> X-Archive-Number: 200811/363 X-Sequence-Number: 127075 On Fri, Oct 31, 2008 at 7:42 PM, Emmanuel Cecchet wr= ote: > Hi Nikhil, > i'm looking at this one: http://archives.postgresql.org/message-id/a301bfd90810310750pf108c69x364995= 46f406650f@mail.gmail.com > Here are a couple of questions: > - How do you ALTER the table to repartition it? fair question. but the patch was advertized to only automate some tasks that we do manually... so keeping the same limitations seems reasonably to me... > - Another option is to have a separate trigger per child table and chain > them to the master table. For example something like: that sounds like a lot of overhead... --------------- Now, about the patch... - seems strange the need to create plpgsql language before we can create any partitioned table but given that the trigger is a plpgsql function (and a c function can't be used because we could need to add new partitions) it seems necesary... ideas? - the update part of the trigger looks very simplistic... if the new values isn't in the range accepted by the partition it errors out because of the check constraint... can't we be a little smarter, delete from the actual partition and insert in the new one... for the rest, the patch passes all regression tests and seems to work as advertized.... --=20 Atentamente, Jaime Casanova Soporte y capacitaci=F3n de PostgreSQL Asesor=EDa y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157