Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error
Дата
Msg-id CAMbWs4_5Q3V_M1FavN07TxcOHhE38vtBaHs-LM2-RN=paYGi-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #19037: Planner fails on estimating array length with "no relation entry" error
Список pgsql-bugs
On Sun, Aug 31, 2025 at 6:51 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The most expedient solution is probably to hack examine_variable
> so that it doesn't fail if root->simple_rel_array isn't there yet.
> That seems mighty ugly though.

As an alternative, I wonder if we could pass root as NULL to
cost_subplan() when it's called from build_subplan(), and possibly
also from SS_process_ctes().  At those points, the root does not yet
contain enough information to safely consult statistics.  Meanwhile,
cost_qual_eval() and the functions it calls are already well-equipped
to handle a NULL root.

- Richard



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