Re: speeding up planning with partitions

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Imai Yoshikazu <yoshikazu_i443(at)live(dot)jp>, "jesper(dot)pedersen(at)redhat(dot)com" <jesper(dot)pedersen(at)redhat(dot)com>, "Imai, Yoshikazu" <imai(dot)yoshikazu(at)jp(dot)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: speeding up planning with partitions
Date: 2019-03-30 16:16:12
Message-ID: CA+HiwqE+hecJXroH0S1rhzRHmiYM1jEPqXqNb1Mh8G_d3LAP3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 31, 2019 at 12:59 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Sat, Mar 30, 2019 at 11:46 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > > The only problem with PartitionPruneInfo structures of which I am
> > > aware is that they rely on PartitionDesc offsets not changing. But I
> > > added code in that commit in ExecCreatePartitionPruneState to handle
> > > that exact problem. See also paragraph 5 of the commit message, which
> > > begins with "Although in general..."
> >
> > Ah. Grotty, but I guess it will cover the issue.
>
> I suppose it is. I am a little suspicious of the decision to make
> PartitionPruneInfo structures depend on PartitionDesc indexes.

Fwiw, I had complained when reviewing the run-time pruning patch that
creating those maps in the planner and putting them in
PartitionPruneInfo might not be a good idea, but David insisted that
it'd be good for performance (in the context of using cached plans) to
compute this information during planning.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-03-30 16:23:58 Re: Berserk Autovacuum (let's save next Mandrill)
Previous Message Robert Haas 2019-03-30 16:11:08 Re: Berserk Autovacuum (let's save next Mandrill)