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 <dgrowleyml@gmail.com>)
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Sun, Jul 27, 2014 at 2:35 AM, Tom Lane <tgl@sss.pgh.pa.us> 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: building pdfs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 9.4 pg_control corruption