Re: Optimize WindowAgg's use of tuplestores

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Optimize WindowAgg's use of tuplestores
Дата
Msg-id 20240712.144108.1870669448685240589.ishii@postgresql.org
обсуждение исходный текст
Ответ на Re: Optimize WindowAgg's use of tuplestores  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers
> @@ -2684,6 +2726,14 @@ ExecEndWindowAgg(WindowAggState *node)
>      PlanState  *outerPlan;
>      int            i;
>  
> +    if (node->buffer != NULL)
> +    {
> +        tuplestore_end(node->buffer);
> +
> +        /* nullify so that release_partition skips the tuplestore_clear() */
> +        node->buffer = NULL;
> +    }
> +
> 
> Is it possible that node->buffer == NULL in ExecEndWindowAgg()?  If
> not, probably making it an Assert() or just removing the if() should
> be fine.

Of course it it possible, for example there's no row in a partition.
Sorry for noise.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



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