Re: Memory leak in vac_update_relstats ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Memory leak in vac_update_relstats ?
Дата
Msg-id 4093.1184939045@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Memory leak in vac_update_relstats ?  (NikhilS <nikkhils@gmail.com>)
Список pgsql-hackers
NikhilS <nikkhils@gmail.com> writes:
> One specific case I want to mention here is hash_create(). For local hash
> tables if HASH_CONTEXT is not specified, they get created in a context which
> becomes a direct child of TopMemoryContext. Wouldn't it be a better idea to
> create the table in CurrentMemoryContext?

It works that way partly for historical reasons and mostly because the
vast majority of dynahash uses are for long-lived hash tables (a quick
search says that a default of CurrentMemoryContext would be correct for
only about one in ten of the current callers).  I don't see any value in
changing it.
        regards, tom lane


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

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: MAXIMUM_ALIGNOF on Windows-32
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MAXIMUM_ALIGNOF on Windows-32