Re: c function: keep objects in memory for all session or all transaction

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: c function: keep objects in memory for all session or all transaction
Дата
Msg-id 4A9EC4C3.8090106@dunslane.net
обсуждение исходный текст
Ответ на Re: c function: keep objects in memory for all session or all transaction  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: c function: keep objects in memory for all session or all transaction  (Christian Gonzalez <christian.gonzalez@sigis.com.ve>)
Список pgsql-hackers

Peter Eisentraut wrote:
> On ons, 2009-09-02 at 10:59 -0430, Christian Gonzalez wrote:
>   
>> Is posible to put 
>> persisten object in memory through postgresql c funtion?
>>     
>
> Well, the PL/Perl and PL/Python languages do some variants of this using
> their GD and SD variables.  So it's surely possible in C as well.
> Memory contexts are the right keyword, but note that if you use
> TopMemoryContext, you are pretty much just using malloc().  Maybe you
> want to try prototyping your functionality in PL/Perl or PL/Python to
> get it started.
>
>   


But if you want something visible to all sessions, something like 
pg_memcache might be what you need. see 
<http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/~checkout~/pgmemcache/pgmemcache/README.pgmemcache?rev=1.11> 
for some details.

cheers

andrew


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: c function: keep objects in memory for all session or all transaction
Следующее
От: Greg Stark
Дата:
Сообщение: Re: remove flatfiles.c