Re: JSON constructors and window functions

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: JSON constructors and window functions
Дата
Msg-id f73bbf99-e17a-fdcc-fdfd-6a1096b6c12a@dunslane.net
обсуждение исходный текст
Ответ на Re: JSON constructors and window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 4/4/22 11:43, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> On 4/3/22 22:46, Andrew Dunstan wrote:
>>> On 4/3/22 20:11, Andres Freund wrote:
>>>> I don't think you're allowed to free stuff in a finalfunc - we might reuse the
>>>> transition state for further calls to the aggregate.
>>> Doh! Of course! I'll fix it in the morning. Thanks.
>> I've committed a fix for this. I didn't find something to clean out the
>> hash table, so I just removed the 'hash_destroy' and left it at that.
>> All the test I did came back with expected results.
>> Maybe a hash_reset() is something worth having assuming it's possible? I
>> note that simplehash has a reset function.
> But removing the hash entries would be just as much of a problem
> wouldn't it?
>
>             


Yes, quite possibly. It looks from some experimentation as though,
unlike my naive preconception, it doesn't process each frame again from
the beginning, so losing the hash entries could indeed be an issue here.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: JSON constructors and window functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Run pg_amcheck in 002_pg_upgrade.pl and 027_stream_regress.pl?