Re: Auto creation of Partitions - Mailing list pgsql-hackers

From Chris Browne
Subject Re: Auto creation of Partitions
Date
Msg-id 60abyqux0x.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Auto creation of Partitions  (NikhilS <nikkhils@gmail.com>)
List pgsql-hackers
peter_e@gmx.net (Peter Eisentraut) writes:
> NikhilS wrote:
>> iv) Based on the PRIMARY, UNIQUE, REFERENCES information specified,
>> pass it on to the children tables.
>
> How will you maintain a primary key in such a table, considering that 
> indexes can't span multiple tables?

On the one hand, I seem to recall seeing "multiple-table-spanning
indices" being on the TODO list.

On the other, it may be that this sort of partitioning is only usable
for scenarios where it is only needful to maintain uniqueness on a
partition-by-partition basis.

>> 1) Whether we should use triggers/rules for step number (iii) above.
>> Maybe rules is the way to go.
>
> Since this would basically be a case of the updatable rules problem, you 
> should review those discussions in the past to check whether the issues 
> mentioned there don't interfere with that plan.
>
>> 2) What other attributes (access permissions e.g.) of the master
>> along with the ones specified in (iv) should be passed on to the
>> children.
>
> Moreover, how are later changes of those attributes propagated?

I hear rumour of there being a more comprehensive proposal on this in
the works...
-- 
(reverse (concatenate 'string "ofni.secnanifxunil" "@" "enworbbc"))
http://linuxfinances.info/info/finances.html
Rules of  the Evil Overlord #189. "I  will never tell the  hero "Yes I
was the one who  did it, but you'll never be able  to prove it to that
incompetent  old fool."  Chances  are, that  incompetent  old fool  is
standing behind the curtain."  <http://www.eviloverlord.com/>


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: PostgreSQL - 'SKYLINE OF' clause added!
Next
From: Teodor Sigaev
Date:
Subject: Re: GIST and TOAST