Re: speeding up planning with partitions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: speeding up planning with partitions
Date
Msg-id 19733.1553877069@sss.pgh.pa.us
Whole thread Raw
In response to Re: speeding up planning with partitions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Amit Langote <Langote_Amit_f8@lab.ntt.co.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: partitioned tables referenced by FKs
Next
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL pollutes the file system