Re: Shared memory

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Shared memory
Дата
Msg-id CA+TgmoaV16XMnLH7vE2Dph_SqZK3iUfNOYRdfXHf7UqfL7q=mw@mail.gmail.com
обсуждение исходный текст
Ответ на Shared memory  (Natarajan R <nataraj3098@gmail.com>)
Список pgsql-hackers
On Fri, Oct 4, 2019 at 5:51 AM Natarajan R <nataraj3098@gmail.com> wrote:
> Why postgres not providing freeing shared memory?

Because it's intended to be used mostly for data structures that live
for the entire server lifetime.

There are some cases, such as various hash tables, where the number of
entries can grow and shrink over time. It might be useful to return
memory that is freed up when the hash table shrinks to the common
pool, but it would be complex, because then we'd have to keep track of
multiple chunks of freed memory and consolidate adjacent chunks and so
forth. I don't see that we'd be likely to get much benefit from such a
system, since a lot of cases memory fragmentation would prevent us
from getting any real benefit.

If you need a shared data structure that is temporary, you might want
to check out DSM and DSA.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: WIP/PoC for parallel backup
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Standby accepts recovery_target_timeline setting?