Re: Auto Partitioning Patch - WIP version 1 - Mailing list pgsql-hackers

From NikhilS
Subject Re: Auto Partitioning Patch - WIP version 1
Date
Msg-id d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com
Whole thread Raw
Responses Re: Auto Partitioning  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-hackers
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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Implicit casts to text
Next
From: Bruce Momjian
Date:
Subject: Re: PL/Python warnings in CVS HEAD