Re: Declarative partitioning

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Declarative partitioning
Date: 2015-08-20 09:34:14
Message-ID: CANP8+jLsxoXEUoL7J5gJGN=pbRf8xeZuqnfAEEO2D4zfsmX3Jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 August 2015 at 10:10, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
wrote:

> On 2015-08-20 AM 05:10, Josh Berkus wrote:
> > On 08/19/2015 04:59 AM, Simon Riggs wrote:
> >> I like the idea of a regular partitioning step because it is how you
> >> design such tables - "lets use monthly partitions".
> >>
> >> This gives sanely terse syntax, rather than specifying pages and pages
> >> of exact values in DDL....
> >>
> >> PARTITION BY RANGE ON (columns) INCREMENT BY (INTERVAL '1 month' )
> >> START WITH value;
> >
> > Oh, I like that syntax!
> >
> > How would it work if there were multiple columns? Maybe we don't want
> > to allow that for this form?
> >
>
> Yea, we could simply restrict it to the single column case, which does not
> sound like a major restriction.
>

PARTITION BY ...
SUBPARTITION BY ...

We should plan for that in the way we develop the internals, but full
support can wait until later patches.

My view has long been that the internals are they aspect here, not the
syntax. We need to be able to have a very fast partition-selection
mechanism that can be used in the planner or executor for each tuple.
Working backwards, we need a relcache representation that allows that, and
a catalog representation that allows that and syntax to match.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-08-20 09:45:52 Re: Declarative partitioning
Previous Message Pavan Deolasee 2015-08-20 09:27:50 Re: Declarative partitioning