Re: What needs to be done for real Partitioning?

From: Tom Lane
Subject: Re: What needs to be done for real Partitioning?
Date: ,
Msg-id: 18168.1111265368@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: What needs to be done for real Partitioning?  (Josh Berkus)
Responses: Re: What needs to be done for real Partitioning?  (Josh Berkus)
List: pgsql-performance

Tree view

What needs to be done for real Partitioning?  (Josh Berkus, )
 Re: What needs to be done for real Partitioning?  (Tom Lane, )
  Re: What needs to be done for real Partitioning?  (Josh Berkus, )
   Re: What needs to be done for real Partitioning?  (Tom Lane, )
    Re: What needs to be done for real Partitioning?  ("Steinar H. Gunderson", )
    Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
 Re: What needs to be done for real Partitioning?  (PFC, )
  Re: What needs to be done for real Partitioning?  (Alvaro Herrera, )
   Re: What needs to be done for real Partitioning?  (Tom Lane, )
    Re: What needs to be done for real Partitioning?  (Alvaro Herrera, )
     Re: What needs to be done for real Partitioning?  (Rod Taylor, )
     Re: What needs to be done for real Partitioning?  (Tom Lane, )
      Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
     Re: What needs to be done for real Partitioning?  (Josh Berkus, )
      Re: What needs to be done for real Partitioning?  (Oleg Bartunov, )
      Re: What needs to be done for real Partitioning?  (Greg Stark, )
    Re: What needs to be done for real Partitioning?  ("Jim C. Nasby", )
  Re: What needs to be done for real Partitioning?  (Tom Lane, )
   Re: What needs to be done for real Partitioning?  (PFC, )
    Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
     Re: What needs to be done for real Partitioning?  (Alvaro Herrera, )
      Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
 Re: What needs to be done for real Partitioning?  ("Stacy White", )
 Re: What needs to be done for real Partitioning?  (Steve Atkins, )
 Re: What needs to be done for real Partitioning?  (Greg Stark, )
  Re: What needs to be done for real Partitioning?  (PFC, )
  Re: What needs to be done for real Partitioning?  (Tom Lane, )
   Re: What needs to be done for real Partitioning?  (Greg Stark, )
    Re: What needs to be done for real Partitioning?  (Tom Lane, )
     Re: What needs to be done for real Partitioning?  (Greg Stark, )
  Re: What needs to be done for real Partitioning?  (Simon Riggs, )
 Re: What needs to be done for real Partitioning?  ("Stacy White", )
  Re: What needs to be done for real Partitioning?  (Tom Lane, )
   Re: What needs to be done for real Partitioning?  (Greg Stark, )
   Re: What needs to be done for real Partitioning?  (Yann Michel, )
 Re: What needs to be done for real Partitioning?  ("Stacy White", )
 Re: What needs to be done for real Partitioning?  ("Stacy White", )
  Re: What needs to be done for real Partitioning?  (Josh Berkus, )
   Re: What needs to be done for real Partitioning?  ("Jim C. Nasby", )
   Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
 Re: What needs to be done for real Partitioning?  ("Jim C. Nasby", )
 Re: What needs to be done for real Partitioning?  (Hannu Krosing, )
  Re: What needs to be done for real Partitioning?  (Josh Berkus, )
   Re: What needs to be done for real Partitioning?  (Bruce Momjian, )
 Re: What needs to be done for real Partitioning?  ("Roger Hand", )

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


pgsql-performance by date:

From: "Steinar H. Gunderson"
Date:
Subject: Re: What needs to be done for real Partitioning?
From: Alvaro Herrera
Date:
Subject: Re: What needs to be done for real Partitioning?