Re: get_loop_count() fails to ignore RELOPT_DEADREL rels
От
Tom Lane
Тема
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels
Дата
Msg-id
24639.1406478690@sss.pgh.pa.us
Ответ на
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels (David Rowley)
Список
Дерево обсуждения
get_loop_count() fails to ignore RELOPT_DEADREL rels David Rowley <dgrowleyml@gmail.com>
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels Tom Lane <tgl@sss.pgh.pa.us>
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels David Rowley <dgrowleyml@gmail.com>
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels Tom Lane <tgl@sss.pgh.pa.us>
Re: get_loop_count() fails to ignore RELOPT_DEADREL rels David Rowley <dgrowleyml@gmail.com>
David Rowley writes: > On Sun, Jul 27, 2014 at 2:35 AM, Tom Lane wrote: >> That patch is entirely bogus. What you should be asking is why >> get_loop_count is being applied to a relation that's supposedly been >> removed from the query. > hmm ok. After further investigation it seems that this is down to the > EquivalenceClass still containing references to the dead rel. What seems to > be happening is match_eclass_clauses_to_index() is calling > generate_implied_equalities_for_column() which is generating RestrictInfo > clauses which make reference to the dead relation. Hm. Maybe we need to improve the join removal code so that it cleans out the eclasses better? But, as you say, it's not clear why it's not failing for the existing left-join cases if that's the problem. You should probably spend a bit of time to understand exactly how the difference is arising. regards, tom lane
В списке pgsql-hackers по дате отправления