Re: speeding up planning with partitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: 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>, Amit Langote <amitlangote09(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(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-29 16:31:09
Message-ID: 19733.1553877069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> writes:
>> About the XXX: I think resetting inh flag is unnecessary, so we should
>> just remove the line.

> Possibly. I hadn't had time to follow up the XXX annotation.

Now I have ...

Yeah, it seems we can just drop that and leave the flag alone. We'll
end up running through set_append_rel_size and finding no relevant
AppendRelInfos, but that's not going to take long enough to be a problem.
It seems better to have the principle that rte->inh doesn't change after
subquery_planner's initial scan of the rtable, so I'll make it so.

>> If we do that, we can also get rid of the following
>> code in set_rel_size():

No, we can't --- that's still reachable if somebody says
"SELECT FROM ONLY partitioned_table".

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-03-29 16:32:25 Re: pgsql: Compute XID horizon for page level index vacuum on primary.
Previous Message Alvaro Herrera 2019-03-29 16:29:33 Re: partitioned tables referenced by FKs