Re: On partitioning

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Bruce Momjian'" <bruce(at)momjian(dot)us>, "'Pg Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On partitioning
Date: 2014-12-03 14:01:38
Message-ID: 20141203140138.GG10679@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 03, 2014 at 10:00:26AM -0300, Alvaro Herrera wrote:
> Amit Langote wrote:
>
> > From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
>
> > > What is an overflow partition and why do we want that?
> >
> > That would be a default partition. That is, where the tuples that
> > don't belong elsewhere (other defined partitions) go. VALUES clause of
> > the definition for such a partition would look like:
> >
> > (a range partition) ... VALUES LESS THAN MAXVALUE
> > (a list partition) ... VALUES DEFAULT
> >
> > There has been discussion about whether there shouldn't be such a
> > place for tuples to go. That is, it should generate an error if a
> > tuple can't go anywhere (or support auto-creating a new one like in
> > interval partitioning?)
>
> In my design I initially had overflow partitions too, because I
> inherited the idea from Itagaki Takahiro's patch. Eventually I realized
> that it's a useless concept, because you can always have leftmost and
> rightmost partitions, which are just regular partitions (except they
> don't have a "low key", resp. "high key"). If you don't define
> unbounded partitions at either side, it's fine, you just raise an error
> whenever the user tries to insert a value for which there is no
> partition.
>
Hi,

Maybe I am not clear on the concept of an overflow partition, but I
thought that it functioned to catch any record that did not fit the
partitioning scheme. You end of range with out a "low key" or "high
key" would only catch problems in those areas. If you partitioned on
work days of the week, you should not have anything on Saturday/Sunday.
How would that work? You would want to catch anything that was not a
weekday in the overflow.

Regards,
Ken

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-12-03 14:39:18 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Michael Paquier 2014-12-03 13:25:19 Re: About xmllint checking for the validity of postgres.xml in 9.5