Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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>
> 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

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2011-07-28 20:36:24
Subject: Re: cheaper snapshots
Previous:From: Robert HaasDate: 2011-07-28 20:29:12
Subject: Re: cheaper snapshots

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group