Re: why partition pruning doesn't work? - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: why partition pruning doesn't work?
Date
Msg-id CAFjFpRe05ChwFcmrSkFVs5PaAbxgwAHOC8xA2MWQqGhjTbfr-Q@mail.gmail.com
Whole thread Raw
In response to Re: why partition pruning doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jun 12, 2018 at 3:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Not sure about a good fix for this.  It seems annoying to copy the
> rel's whole partkey data structure into query-local storage, but
> I'm not sure we have any choice.  On the bright side, there might
> be an opportunity to get rid of repeated runtime fmgr_info lookups
> in cross-type comparison situations.
>

We already do that while building part_scheme. So, if we are in
planner, it's readily available through RelOptInfo. If we need it in
the executor, we need to pass it down from RelOptInfo into one of the
execution states. I haven't looked at the patch to exactly figure out
which of these is true.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Next
From: Peter Eisentraut
Date:
Subject: Re: assert in nested SQL procedure call in current HEAD