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

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: New partitioning WAS: Check constraints on partition parents only?
Дата
Msg-id 20110728202935.GA6285@svana.org
обсуждение исходный текст
Ответ на Re: New partitioning WAS: Check constraints on partition parents only?  (Robert Haas <robertmhaas@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: cheaper snapshots
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: cheaper snapshots