Re: ERROR: no relation entry for relid 6

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: no relation entry for relid 6
Дата
Msg-id 1998182.1685117811@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ERROR: no relation entry for relid 6  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: ERROR: no relation entry for relid 6  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Fri, May 26, 2023 at 6:06 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Based on what deconstruct_distribute_oj_quals is doing, it seems
>> likely to me that there are cases that require ignoring
>> commute_above_r, but I've not tried to devise one.  It'd be good to
>> have one to include in the commit, if we can find one.

> It seems that queries of the second form of identity 3 require ignoring
> commute_above_r.
> select 1 from t t1 left join (t t2 left join t t3 on t2.a = t3.a) on
> t1.a = t2.a;
> When removing t2/t3 join, the clone of 't2.a = t3.a' with t1 join in the
> nulling bitmap would be put back if we do not ignore commute_above_r.
> There is no observable problem though because it would be rejected later
> in subbuild_joinrel_restrictlist, but still I think it should not be put
> back in the first place.

Ah.  I realized that we could make the problem testable by adding
assertions that a joinclause we're not removing doesn't contain
any surviving references to the target rel or join.  That turns
out to fire (without the bug fix) in half a dozen existing test
cases, so I felt that we didn't need to add another one.

I did the other refactoring we discussed and pushed it.
Thanks for the report and review!

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?
Следующее
От: Kaiting Chen
Дата:
Сообщение: Re: Is NEW.ctid usable as table_tuple_satisfies_snapshot?