Re: Do we need a ShmList implementation?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Do we need a ShmList implementation?
Дата
Msg-id 1284999622.1733.5756.camel@ebony
обсуждение исходный текст
Ответ на Re: Do we need a ShmList implementation?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Do we need a ShmList implementation?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On Mon, 2010-09-20 at 18:37 +0300, Heikki Linnakangas wrote:

> > SHM_QUEUE objects provide the infrastructure for maintaining a
> > shared memory linked list, but they don't do anything about the
> > allocation and release of the space for the objects.  So it occurs
> > to me that I'm using an HTAB for this collection because it provides
> > the infrastructure for managing the memory for the collection,
> > rather than because I need hash lookup.  :-(  It works, but that
> > hardly seems optimal.
> 
> > Have I missed something we already have which could meet that need?
> 
> Well, we generally try to avoid dynamic structures in shared memory, 
> because shared memory can't be resized. So, you'd typically use an array 
> with a fixed number of elements. One could even argue that we 
> specifically *don't* want to have the kind of infrastructure you 
> propose, to discourage people from writing patches that need dynamic 
> shmem structures.

My understanding is that we used to have that and it was removed for the
reasons Heikki states. There are still vestigial bits still in code.

Not exactly impressed with the SHM_QUEUE stuff though, so I appreciate
the sentiment that Kevin expresses.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Development, 24x7 Support, Training and Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq changes for synchronous replication
Следующее
От: Mark Wong
Дата:
Сообщение: Re: compile/install of git