Re: Is there any method to keep table in memory at startup

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Is there any method to keep table in memory at startup
Дата
Msg-id 2338.24.211.141.25.1083930116.squirrel@www.dunslane.net
обсуждение исходный текст
Ответ на Re: Is there any method to keep table in memory at startup  (Vinay Jain <vinayj@sarathi.ncst.ernet.in>)
Ответы Re: Is there any method to keep table in memory at startup
Список pgsql-hackers
Vinay Jain said:
> Andrew Dunstan wrote:
>
>>
>> uh ... maybe you need to look in your C manual about the effect of a
>> "static" declaration. The object will be created once.
>>
> yup I know the effect of Static but this is also fact that when
> program terminates and restarts object will be created again...(not
> persistant)..
>

you can have it preloaded and persistent to the end of the server run, see
http://www.postgresql.org/docs/current/static/runtime-config.html#RUNTIME-
CONFIG-RESOURCE


> one thing strikes in my mind is that indchar_lt is function in shared
> object file indchar.so.....if this file is not unloaded during Order by
>  call than this static defination can work for me..
> Not sure but I think this file is loaded each time indchar_lt is called
>  in order by clause...
>

If course it is not loaded each time. That would be insane. If not
preloaded it is loaded when first called in each process, and then kept.
It is never unloaded (except by the termination of the process that loaded
it).

It seems you have been laboring under a misapprehension.

cheers

andrew





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

Предыдущее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: ALTER TABLE TODO items
Следующее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN