Re: postgresql and process titles

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: postgresql and process titles
Дата
Msg-id 20060614203759.GJ4748@svana.org
обсуждение исходный текст
Ответ на Re: postgresql and process titles  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: postgresql and process titles  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
On Wed, Jun 14, 2006 at 03:21:55PM -0500, Jim C. Nasby wrote:
> One idea would be to keep something akin to a FIFO, where the backend
> would write records instead of updating/over-writing them, and the
> reader process would only read records where there was no risk that they
> were still being written. That would mean that the reader would need to
> stay at least one record behind the backend, but that's probably
> manageable.

The problem with a FIFO is that the pointers controlling where the
start/end are become the contention.

The only thing I can think of is to have the backends only write atomic
types and give each backend their own cache-line. The profiler would
simply wake up every N ms and read each value, accumulating them
somewhere.

No locking and there would be a maximum of one cache-line bounce per
backend per N ms. I'm not sure you can get better than that under the
situation.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: postgresql and process titles
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Alternative variable length structure