Re: Auto Partitioning - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Auto Partitioning
Date
Msg-id 871wj0ko91.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Auto Partitioning  (Markus Schiltknecht <markus@bluegap.ch>)
Responses Re: Auto Partitioning  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-hackers
"Markus Schiltknecht" <markus@bluegap.ch> writes:

> CREATE INDEX x ON test(a, b, c);
>
> That's why I'd say, the first column of an index would have to be equal to all
> of the columns used in the partitioning key.

That's certainly the simple case. It would be nice to be able to create an
index like that and have the system automatically recognize that the leading
column is identical to the partition key of (a) and therefore build indexes on
each partition on (b,c).

However there are also cases such as where you have a=0..99 in one partition
and a=100..199 in partition two, etc. It could still automatically build
indexes on (a,b,c) on each partition and somehow note that the unique
constraint is guaranteed across the whole partitioned table.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: elog(FATAL) vs shared memory
Next
From: Markus Schiltknecht
Date:
Subject: Re: Auto Partitioning