Re: Patch to support SEMI and ANTI join removal - Mailing list pgsql-hackers

From David Rowley
Subject Re: Patch to support SEMI and ANTI join removal
Date
Msg-id CAApHDvrkHo=GiNU4nTQN9j6JJKz+wQ83HB0oFz=W_d0ztXuoDA@mail.gmail.com
Whole thread Raw
In response to Re: Patch to support SEMI and ANTI join removal  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Patch to support SEMI and ANTI join removal
List pgsql-hackers
On Fri, Sep 12, 2014 at 3:35 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Thu, Sep 11, 2014 at 7:14 AM, David Rowley <dgrowleyml@gmail.com> wrote:
>
> 1. I don't think that I'm currently handling removing eclass members
> properly. So far the code just removes the Vars that belong to the relation
> being removed. I likely should also be doing bms_del_member(ec->ec_relids,
> relid); on the eclass, but perhaps I should just be marking the whole class
> as "ec_broken = true" and adding another eclass all everything that the
> broken one has minus the parts from the removed relation?

I haven't read the patch, but I think the question is why this needs
to be different than what we do for left join removal.


I discovered over here -> http://www.postgresql.org/message-id/CAApHDvo5wCRk7uHBuMHJaDpbW-b_oGKQOuisCZzHC25=H3__fA@mail.gmail.com during the early days of the semi and anti join removal code that the planner was trying to generate paths to the dead rel. I managed to track the problem down to eclass members still existing for the dead rel. I guess we must not have eclass members for outer rels? or we'd likely have seen some troubles with left join removals already. 

In the meantime I'll fix up the inner join removal code to properly delete the ec_relids member for the dead rel. I guess probably the restrict info should come out too.

I know it's late in the commitfest, but since there was next to no interest in semi and anti join removals, can I rename the patch in the commitfest app to be "Inner join removals"? It's either that or I'd mark that patch as rejected and submit this one in October.

Regards

David Rowley

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Stating the significance of Lehman & Yao in the nbtree README
Next
From: Heikki Linnakangas
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)