Re: dynamically allocating chunks from shared memory

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: dynamically allocating chunks from shared memory
Дата
Msg-id 1279823238-sup-6350@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: dynamically allocating chunks from shared memory  (Markus Wanner <markus@bluegap.ch>)
Ответы Re: dynamically allocating chunks from shared memory  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
Excerpts from Markus Wanner's message of jue jul 22 08:49:29 -0400 2010:

> Of course, as mentioned in the bgworker patch, this could be done 
> differently. Using solely shared memory, or maybe SLRU to store change 
> sets. However, I certainly like the abstraction and guarantees such a 
> message passing system provides. It makes things easier to reason about, 
> IMO.

FWIW I don't think you should be thinking in "replacing imessages with
SLRU".  I rather think you should be thinking in how can you implement
the imessages API on top of SLRU.  So as far as the coordinator and
background worker are concerned, there wouldn't be any difference --
they keep using the same API they are using today.

Also let me repeat my earlier comment about imessages being more similar
to multixact than to notify.  The content of each multixact entry is
just an arbitrary amount of bytes.  If imessages are numbered from a
monotonically increasing sequence, it should be possible to use a very
similar technique, and perhaps you should be able to reduce locking
requirements as well (write messages with only a shared lock, after
you've determined and reserved the area you're going to write).


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: CommitFest 2010-07 week one progress report
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [RRR] CommitFest 2010-07 week one progress report