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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #17777: An assert failed in nodeWindowAgg.c
Дата
Msg-id CAApHDvpeXSU4A=mzX=96Rdn6u4gjVLHy8SMaVm_g01S8yhfAoQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17777: An assert failed in nodeWindowAgg.c  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #17777: An assert failed in nodeWindowAgg.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sat, 11 Feb 2023 at 13:49, Andres Freund <andres@anarazel.de> wrote:
> I think we could just add a !contain_subplans() to the code deciding whether
> it's safe to use the movable window optimization?

I think this is a fair way to fix the bug.  I think we're pretty
unlikely to disappoint too many people by just disabling the inverse
transitions when the filter has a subplan. I think it'll be rare that
a WindowFunc would even have a filter, let alone one with a subplan.

I think there are other reasons that a subplan might not return the
same thing when it's executed again.  Maybe a synchronous seq scan
looking for some tuple with a subquery containing a LIMIT 1. If the
sync scan started in a different place each time then some other tuple
could be returned.  So I think checking if the filter contains
subplans is a good fix.

Here's a patch for that.

David

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17788: Incorrect memory access when parsing empty string as sql_standard interval
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17777: An assert failed in nodeWindowAgg.c