From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: What needs to be done for real Partitioning? |
Date: | 2005-03-19 20:49:28 |
Message-ID: | 18168.1111265368@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Josh Berkus <josh(at)agliodbs(dot)com> writes:
> -- CREATE TABLE ... WITH PARTITION ON {expression}
I'd rather see the partition control stuff as ALTER TABLE commands,
not decoration on CREATE TABLE. See the WITH OIDS business we just went
through: adding nonstandard decoration to a standard command isn't good.
> -- INSERT INTO should automatically create new partitions where necessary
> -- DELETE FROM should automatically drop empty partitions
I am not sure I agree with either of those, and the reason is that they
would turn low-lock operations into high-lock operations. DELETE FROM
would be particularly bad. Furthermore, who wants to implement DROP
PARTITION as a DELETE FROM? ISTM the whole point of partitioning is to
be able to load and unload whole partitions quickly, and having to
DELETE all the rows in a partition isn't my idea of quick.
> -- setting of WITH PARTITION ON {expression} TABLESPACE should automatically
> create a new tablespace for each new partition and its indexes.
This is a bad idea. Where are you going to create these automatic
tablespaces? What will they be named? Won't this require superuser
privileges? And what's the point anyway?
> -- It should be possible to create new, empty partitions via a CREATE TABLE
> PARTITION OF {table} ON {value} expression.
Huh? ISTM this confuses establishment of a table's partition rule with
the act of pre-creating empty partitions for not-yet-used ranges of
partition keys. Or are you trying to suggest that a table could be
partitioned more than one way at a time? If so, how?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | PFC | 2005-03-19 22:24:39 | Re: What needs to be done for real Partitioning? |
Previous Message | Josh Berkus | 2005-03-19 20:02:38 | What needs to be done for real Partitioning? |