Re: Dynamic Partitioning using Segment Visibility Maps

From: Gavin Sherry <swm(at)alcove(dot)com(dot)au>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Dynamic Partitioning using Segment Visibility Maps
Date: 2008-01-11 09:25:14
Message-ID: 20080111092514.GT6934@europa.idg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 11, 2008 at 08:07:18AM +0000, Simon Riggs wrote:
> On Fri, 2008-01-11 at 02:28 +0100, Gavin Sherry wrote:
> > On Thu, Jan 10, 2008 at 09:30:10PM +0000, Simon Riggs wrote:
> > > > > We cannot perform partition exclusion using this type of WHERE clause at
> > > > > planning time because the CURRENT DATE function is STABLE.
> > > >
> > > > We can do the exact same thing -- if it's a direction people want to
> > > > take. In fact, we can do it better/faster because once we've evaluated one
> > > > partition we know that there are no others to evaluate.
> > >
> > > Lost you completely here. I'm explaining to you that *nobody* can solve
> > > those problems solely at planning time, by definition, so it has to be
> > > done at execution time. I'm not saying anything about your way, my way.
> >
> > Sorry, I wasn't clear enough. I was trying to say, if we're going to do
> > something in the executor (for right or wrong) the declarative approach
> > can do it too. Since there will be partition bounding information
> > available, we can do partition selection in the executor (maybe the
> > planner should tell us to do it).
>
> Of course. It's an identical situation for both. Regrettably, none of
> your comments about dynamic partitioning and planning were accurate as a
> result.

That's not true. We will still have planning drive the partition
selection when the predicate is immutable, thus having more accurate
plans. Some but not all plans use current_date and similar.

>
> > Okay. As I said above, nothing in declarative partitioning rules out
> > partition selection with stable functions. So, we lets do it, assuming
> > everyone else thinks it is a good idea.
>
> If you check the archives this was long ago been identified as a
> requirement. And I said exactly the things you said, BTW, when trying to
> say it didn't matter.
>
> I've kept a list of requests for improvement that I can share with you;
> I've always been loathe to publish a list of bad points.

Why, please send them.

Thanks,

Gavin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-01-11 09:42:59 Re: Dynamic Partitioning using Segment Visibility Maps
Previous Message Dave Page 2008-01-11 08:47:56 Re: Pl/Java broken since Postgresql 8.3-rc1