Re: BUG #17777: An assert failed in nodeWindowAgg.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17777: An assert failed in nodeWindowAgg.c
Дата
Msg-id 439391.1676070752@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17777: An assert failed in nodeWindowAgg.c  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #17777: An assert failed in nodeWindowAgg.c  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> The problem is that normally we supress the moving aggregate optimization if a
> volatile function is contained in the filter. But unfortunately,
> contain_volatile_functions() doesn't descend into subplans. So we don't see
> the volatile expression.

I would say that if a volatile function in the argument crashes things,
that's an executor bug.  You won't get any sympathy from me for
complaints about whether contain_volatile_functions noticed that,
because *immutability markings can be lies*.  It is not acceptable
to crash if they're wrong.

It looks to me like maybe we could just remove the Assert and do

-    if (peraggstate->transValueCount == 1)
+    if (peraggstate->transValueCount < 2)

a few lines further down?  I've not dug into the details though.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #17777: An assert failed in nodeWindowAgg.c
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #17777: An assert failed in nodeWindowAgg.c