| От | Tom Lane |
|---|---|
| Тема | Re: Custom cache implemented in a postgresql C function |
| Дата | |
| Msg-id | 9905.1287628349@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Custom cache implemented in a postgresql C function (Gabi Julien <gabi.julien@broadsign.com>) |
| Список | pgsql-general |
Gabi Julien <gabi.julien@broadsign.com> writes:
> In my case, I do not know how big my cache will be.
That makes it awfully hard to use shared memory.
> If shared memory turns out too difficult to use, I could create
> separate caches for each postgresql processes.
That's what I'd recommend. A big advantage of private caches is that
you don't have any need to manage concurrent access, which simplifies
the code and avoids contention. All the caches that the core Postgres
code maintains are per-backend.
> This would be a waste
> of space but it might be better then nothing. In this case, do I need
> to make my code thread safe? In other words, is postgresql using more
> then one thread per processes?
No.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера