Re: New partitioning WAS: Check constraints on partition parents only? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: New partitioning WAS: Check constraints on partition parents only?
Date
Msg-id 20110728202935.GA6285@svana.org
Whole thread Raw
In response to Re: New partitioning WAS: Check constraints on partition parents only?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jul 28, 2011 at 10:20:57AM -0400, Robert Haas wrote:
> What Itagaki Takahiro proposed a year ago was basically something
> where you would say, OK, I want to partition on this column (or maybe
> expression).  And then you say:
>
> If the value is less than v1, put it in a partition called p1.
> If the value is less than v2, put it in a position called p2.
> <repeat ad nauseum, and then, optionally:>
> If the value is not less than any of the above, put it in a partition
> called poverflow.
>
> I like that design, not least but also not only because it's similar
> to what one of our competitors does.

FWIW, this seems to me to be the most useful design, because the other
nice use for partitioning is being able to throw away old data without
leaving huge chunks of deleted row. If the column you partition on
is a timestamp, then the above scheme makes it easy to just drop the
oldest partition when the disk is nearly full.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.  -- Arthur Schopenhauer

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: cheaper snapshots
Next
From: Hannu Krosing
Date:
Subject: Re: cheaper snapshots