Re: New partitioning WAS: Check constraints on partition parents only?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: New partitioning WAS: Check constraints on partition parents only?
Date: 2011-07-28 20:29:35
Message-ID: 20110728202935.GA6285@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2011-07-28 20:36:24 Re: cheaper snapshots
Previous Message Robert Haas 2011-07-28 20:29:12 Re: cheaper snapshots