Re: On disable_cost

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: On disable_cost
Дата
Msg-id 1701515.1710264778@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: On disable_cost  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: On disable_cost  (Robert Haas <robertmhaas@gmail.com>)
Re: On disable_cost  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 3, 2023 at 5:22 AM Jian Guo <gjian@vmware.com> wrote:
>> I have write an initial patch to retire the disable_cost GUC, which labeled a flag on the Path struct instead of
addingup a big cost which is hard to estimate. Though it involved in tons of plan changes in regression tests, I have
testedon some simple test cases such as eagerly generate a two-stage agg plans and it worked. Could someone help to
review?

> I took a look at this patch today. I believe that overall this may
> well be an approach worth pursuing. However, more work is going to be
> needed. Here are some comments:

> 1. You stated that it changes lots of plans in the regression tests,
> but you haven't provided any sort of analysis of why those plans
> changed. I'm kind of surprised that there would be "tons" of plan
> changes. You (or someone) should look into why that's happening.

I've not read the patch, but given this description I would expect
there to be *zero* regression changes --- I don't think we have any
test cases that depend on disable_cost being finite.  If there's more
than zero changes, that very likely indicates a bug in the patch.
Even if there are places where the output legitimately changes, you
need to justify each one and make sure that you didn't invalidate the
intent of that test case.

BTW, having written that paragraph, I wonder if we couldn't get
the same end result with a nearly one-line change that consists of
making disable_cost be IEEE infinity.  Years ago we didn't want
to rely on IEEE float semantics in this area, but nowadays I don't
see why we shouldn't.

            regards, tom lane



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: UUID v7
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: perl: unsafe empty pattern behavior