Re: Auto Partitioning Patch - WIP version 1

From: NikhilS <nikkhils(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Auto Partitioning Patch - WIP version 1
Date: 2007-04-03 15:36:10
Message-ID: d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi,

>
> The following things are TODOs:
>
> iv) Auto generate rules using the checks mentioned for the partitions, to
> handle INSERTs/DELETEs/UPDATEs to navigate them to the appropriate child.
> Note that checks specified directly on the master table will get inherited
> automatically.

Am planning to do the above by using the check constraint specified for each
partition. This constraint's raw_expr field ends up becoming the whereClause
for the rule specific to that partition.

One question is whether we should we allow auto creation of UPDATE rules
given that updates can end up spanning multiple partitions if the column on
which partitioning is specified gets updated?

Also if we decide to auto - add rules for UPDATE, the raw_expr will need to
be modified to refer to "OLD."col, which can be quite a headache. We do not
have parsetree walker/mutator functions as far as I could see in the code.

Regards,
Nikhils

--
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2007-04-03 15:47:14 Re: Bug in UTF8-Validation Code?
Previous Message Bruce Momjian 2007-04-03 15:17:41 Re: Implicit casts to text

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-04-03 16:26:32 Re: COPY-able sql log outputs
Previous Message Simon Riggs 2007-04-03 15:06:59 Re: [Fwd: Deferred Transactions, Transaction Guaranteeand COMMITwithout waiting]