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 E42D35684C for ; Sat, 19 Mar 2005 20:02:53 +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 37305-01 for ; Sat, 19 Mar 2005 20:02:51 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 65FE856826 for ; Sat, 19 Mar 2005 20:02:50 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7145685 for pgsql-performance@postgresql.org; Sat, 19 Mar 2005 12:04:42 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: What needs to be done for real Partitioning? Date: Sat, 19 Mar 2005 12:02:38 -0800 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200503191202.38089.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/371 X-Sequence-Number: 11076 Folks, I may (or may not) soon have funding for implementing full table partitioning in PostgreSQL. I thought it would be a good idea to discuss with people here who are already using pseudo-partitioning what things need to be added to Postgresql in order to make full paritioning a reality; that is, what do other databases do that we don't? Implementations are seperated into phases I and II, II being harder-and-optional-stuff that may get done later, I being essential features. Ph. I -- CREATE TABLE ... WITH PARTITION ON {expression} ---- should automatically create expression index on {expression} -- INSERT INTO should automatically create new partitions where necessary ---- new tables should automatically inherit all constraints, indexes, keys of "parent" table -- UPDATE should automatically move rows between partitions where applicable -- Query Planner/Executor should be improved to not always materialize paritioned tables used in subqueries and joins. Ph. II -- Foreign Keys to/from partitioned tables should become possible -- Query Planner/Executor should be improved to only join partitions which are compliant with the query's WHERE or JOIN clauses where reasonable -- DELETE FROM should automatically drop empty partitions -- setting of WITH PARTITION ON {expression} TABLESPACE should automatically create a new tablespace for each new partition and its indexes. -- It should be possible to create new, empty partitions via a CREATE TABLE PARTITION OF {table} ON {value} expression. All syntax above is, of course, highly debatable. -- Josh Berkus Aglio Database Solutions San Francisco