Re: Hash join in SELECT target list expression keeps consuming memory

Поиск
Список
Период
Сортировка
От Amit Khandekar
Тема Re: Hash join in SELECT target list expression keeps consuming memory
Дата
Msg-id CAJ3gD9coxPJUwGPXAjHHCyjKg=JRcqkh3hTvzJPoLis1-dkX6Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Hash join in SELECT target list expression keeps consuming memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Hash join in SELECT target list expression keeps consuming memory
Список pgsql-hackers
On 17 March 2018 at 00:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Khandekar <amitdkhan.pg@gmail.com> writes:
>> If the SELECT target list expression is a join subquery, and if the
>> subquery does a hash join, then the query keeps on consuming more and
>> more memory. Below is such a query :
>
> Thanks for the report!
>
> I dug into this with valgrind, and found that the problem is that
> ExecHashTableCreate allocates some memory that isn't freed by
> ExecHashTableDestroy, specifically the per-hash-key function
> information.  This is just dumb.  We can keep that stuff in the
> hashtable's hashCxt instead, where it will get freed at the right time.
> The attached patch seems to fix it just by reordering the code.

I saw that you have now committed the fix and also backported it to
all supported branches.

Thanks !

-Amit Khandekar
EnterpriseDB Corporation
The Postgres Database Company


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Online enabling of checksums
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: file cloning in pg_upgrade and CREATE DATABASE