Re: Storing MemoryContext Pointers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Storing MemoryContext Pointers
Дата
Msg-id 384.1160076883@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Storing MemoryContext Pointers  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Ответы Re: Storing MemoryContext Pointers  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Список pgsql-hackers
Volkan YAZICI <yazicivo@ttnet.net.tr> writes:
> When I allocate a new memory context via

>   oldmcxt = AllocSetContextCreate(TopMemoryContext, ...)
>   persistent_mcxt = CurrentMemoryContext;

ITYM
   persistent_mcxt = AllocSetContextCreate(TopMemoryContext, ...)

because the other doesn't do what you think...

> How can I store the persistent_mcxt in a persistent place that I'll be
> able to reach it in my next getting invoked?

Make it a static variable.
        regards, tom lane


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

Предыдущее
От: "Mark Woodward"
Дата:
Сообщение: Re: Query Failed, out of memory
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Upgrading a database dump/restore