Richard Guo <guofengli...@gmail.com> writes:
> This should be an oversight in 9df8f903.  It seems that the new added
> function add_outer_joins_to_relids() does not cope well with child
> joins.  The 'input_relids' for a child join is the relid sets of child
> rels while 'othersj->min_xxxhand' refers to relids of parent rels.  So
> there would be problem when we add the relids of the pushed-down joins.

Indeed.  Adding the OJ relid itself works fine, but we won't get the
required matches when we scan the join_info_list.

> Instead of fixing add_outer_joins_to_relids() to cope with child joins,
> I'm wondering if we can build join relids for a child join from its
> parent by adjust_child_relids, something like attached.

That looks like a good solid solution.  Pushed with a bit of
editorialization --- mostly, that I put the test case into
partition_join.sql where there's already suitable test tables.

                        regards, tom lane


Reply via email to