X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B49EB568A7 for ; Sat, 19 Mar 2005 20:49:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46172-08 for ; Sat, 19 Mar 2005 20:49:29 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E5D095637A for ; Sat, 19 Mar 2005 20:49:28 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2JKnSQb018169; Sat, 19 Mar 2005 15:49:28 -0500 (EST) To: Josh Berkus Cc: pgsql-performance@postgresql.org Subject: Re: What needs to be done for real Partitioning? In-reply-to: <200503191202.38089.josh@agliodbs.com> References: <200503191202.38089.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Sat, 19 Mar 2005 12:02:38 -0800" Date: Sat, 19 Mar 2005 15:49:28 -0500 Message-ID: <18168.1111265368@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/372 X-Sequence-Number: 11077 Josh Berkus 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