On Tue, Jul 15, 2014 at 2:17 PM, Kyotaro HORIGUCHI <
> Hi, the attached is the revised version.
Thanks Horiguchi-San for the updated patch.
Today while looking into updated patch, I was wondering why can't
we eliminate useless keys in query_pathkeys when we actually build
the same in function standard_qp_callback(), basically somewhat
similar to what we do in
We already have index information related to base_rels before building
query pathkeys. I noticed that you mentioned the below in your original
mail which indicates that information related to inheritance tables is built
only after set_base_rel_sizes()
"These steps take place between set_base_rel_sizes() and
set_base_rel_pathlists() in make_one_rel(). The reason for the
position is that the step 2 above needs all inheritence tables to
be extended in PlannerInfo and set_base_rel_sizes (currently)
Now I am not sure why such information is not build during
build_simple_rel() in below code path:
AppendRelInfo *appinfo = (AppendRelInfo *) lfirst(l);
/* append_rel_list contains all append rels; ignore others */
if (appinfo->parent_relid != relid)
(void) build_simple_rel(root, appinfo->child_relid,
Could you please explain me why the index information built in above
path is not sufficient or is there any other case which I am missing?