Re: Creating a partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Scalia <jayknowsunix@xxxxxxxxx> writes:
> Ok I tried what Laurent had suggested and now the error is:
> Insufficient columns in PRIMARY KEY constraint definition.

> Now, the attribute the devs want is not a key value in the original table, but if it were that wouldn’t make a great deal of sense for a partition. So, now why did it gripe?

FWIW, we recently rephrased that message as "unique constraint on
partitioned table must include all partitioning columns", because
people were finding it confusing.

The reason for the restriction is that a partitioned index is really
just a collection of separate indexes on the individual leaf partitions
(just as the partitioned table is a collection of plain tables).
So it can't enforce uniqueness across partitions unless such uniqueness
is guaranteed by the partitioning scheme.

Yeah, this is an implementation restriction, but I don't foresee it
ever going away.  If the indexes weren't independent then you'd lose
the scalability benefits that partitioning is meant to provide.

			regards, tom lane






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux